mirror of
https://github.com/hackdiaz-dev/free-turn-proxy.git
synced 2026-10-12 09:41:53 +02:00
fix: заменить устаревший token_type=messages на анонимные скоупы в VK авторизации
This commit is contained in:
@@ -12,8 +12,8 @@ import (
|
||||
// fetchAnonToken - шаг 1 цепочки: обменивает app client_id/client_secret
|
||||
// на анонимный access token из login.vk.ru.
|
||||
func (c *Client) fetchAnonToken(ctx context.Context, httpClient tlsclient.HttpClient, profile browserprofile.Profile, creds VKCredentials) (string, error) {
|
||||
data := fmt.Sprintf("client_id=%s&token_type=messages&client_secret=%s&version=1&app_id=%s",
|
||||
creds.ClientID, creds.ClientSecret, creds.ClientID)
|
||||
data := fmt.Sprintf("client_secret=%s&client_id=%s&scopes=audio_anonymous,video_anonymous,photos_anonymous,profile_anonymous&isApiOauthAnonymEnabled=false&version=1&app_id=%s",
|
||||
creds.ClientSecret, creds.ClientID, creds.ClientID)
|
||||
resp, err := c.doRequest(ctx, httpClient, profile, data, "https://login.vk.ru/?act=get_anonym_token")
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user