modified: internal/config/oauth.go

modified:   internal/handlers/oauth.go
	new file:   internal/handlers/oauth_VK.go
	new file:   internal/handlers/oauth_yandex.go
	modified:   internal/utils/oauth_utils.go
add oauth for VK and ynadex and google
This commit is contained in:
2025-09-30 03:19:33 +05:00
parent c987e3ec19
commit 018f80098e
5 changed files with 325 additions and 32 deletions
@@ -8,6 +8,7 @@ import (
"golang.org/x/oauth2/vk"
)
var (
GoogleOAuthConfig = &oauth2.Config{
ClientID: "your-google-client-id",
@@ -21,6 +22,7 @@ var (
ClientID: "your-yandex-client-id",
ClientSecret: "your-yandex-client-secret",
RedirectURL: "http://localhost:8080/auth/yandex/callback",
Scopes: []string{"login:email", "login:info", "login:avatar"},
Endpoint: yandex.Endpoint,
}
@@ -28,7 +30,7 @@ var (
ClientID: "your-vk-client-id",
ClientSecret: "your-vk-client-secret",
RedirectURL: "http://localhost:8080/auth/vk/callback",
Scopes: []string{"email", "photos"},
Endpoint: vk.Endpoint,
Scopes: []string{"email"},
}
)