Skip to content

Commit be59c36

Browse files
committed
fix: add comment for scope
1 parent db351f7 commit be59c36

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/handlers/oauth_login.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,9 @@ func OAuthLoginHandler() gin.HandlerFunc {
184184
return
185185
}
186186
oauth.OAuthProviders.AppleConfig.RedirectURL = hostname + "/oauth_callback/" + constants.SignupMethodApple
187-
// Scope from the root config was not passed for apple login
188-
url := oauth.OAuthProviders.AppleConfig.AuthCodeURL(oauthStateString, oauth2.SetAuthURLParam("response_mode", "form_post")) + "&scope=openid name email"
187+
// there is scope encoding issue with oauth2 and how apple expects, hence added scope manually
188+
// check: https://github.com/golang/oauth2/issues/449
189+
url := oauth.OAuthProviders.AppleConfig.AuthCodeURL(oauthStateString, oauth2.SetAuthURLParam("response_mode", "form_post")) + "&scope=name email"
189190
c.Redirect(http.StatusTemporaryRedirect, url)
190191
default:
191192
log.Debug("Invalid oauth provider: ", provider)

0 commit comments

Comments
 (0)