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:
@@ -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"},
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user