fix: update scope for apple login

This commit is contained in:
Lakhan Samani
2022-06-14 14:41:31 +05:30
parent c9ba0b13f8
commit 7d1272d815
2 changed files with 2 additions and 1 deletions

View File

@@ -185,7 +185,7 @@ func OAuthLoginHandler() gin.HandlerFunc {
}
oauth.OAuthProviders.AppleConfig.RedirectURL = hostname + "/oauth_callback/" + constants.SignupMethodApple
// Scope from the root config was not passed for apple login
url := oauth.OAuthProviders.AppleConfig.AuthCodeURL(oauthStateString, oauth2.SetAuthURLParam("response_mode", "form_post"), oauth2.SetAuthURLParam("scope", "name email"))
url := oauth.OAuthProviders.AppleConfig.AuthCodeURL(oauthStateString, oauth2.SetAuthURLParam("response_mode", "form_post"), oauth2.SetAuthURLParam("scope", "name%20email"))
c.Redirect(http.StatusTemporaryRedirect, url)
default:
log.Debug("Invalid oauth provider: ", provider)