1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-25 23:52:32 +02:00

[#2533] added VK OAuth2 provider

Co-authored-by: Valentine <xb2w1z@gmail.com>
This commit is contained in:
Gani Georgiev
2023-05-24 15:34:25 +03:00
parent e40cf46b33
commit af71b63f23
41 changed files with 173 additions and 39 deletions

View File

@@ -139,9 +139,14 @@ func (api *recordAuthApi) authMethods(c echo.Context) error {
oauth2.SetAuthURLParam("code_challenge_method", codeChallengeMethod),
}
if name == auth.NameApple {
// custom providers url options
switch name {
case auth.NameApple:
// see https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms#3332113
urlOpts = append(urlOpts, oauth2.SetAuthURLParam("response_mode", "query"))
case auth.NameVK:
// vk currently doesn't support PKCE for server-side authorization
urlOpts = []oauth2.AuthCodeOption{}
}
result.AuthProviders = append(result.AuthProviders, providerInfo{