Skip to content

Commit 7d1272d

Browse files
committed
fix: update scope for apple login
1 parent c9ba0b1 commit 7d1272d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

server/handlers/oauth_login.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func OAuthLoginHandler() gin.HandlerFunc {
185185
}
186186
oauth.OAuthProviders.AppleConfig.RedirectURL = hostname + "/oauth_callback/" + constants.SignupMethodApple
187187
// Scope from the root config was not passed for apple login
188-
url := oauth.OAuthProviders.AppleConfig.AuthCodeURL(oauthStateString, oauth2.SetAuthURLParam("response_mode", "form_post"), oauth2.SetAuthURLParam("scope", "name email"))
188+
url := oauth.OAuthProviders.AppleConfig.AuthCodeURL(oauthStateString, oauth2.SetAuthURLParam("response_mode", "form_post"), oauth2.SetAuthURLParam("scope", "name%20email"))
189189
c.Redirect(http.StatusTemporaryRedirect, url)
190190
default:
191191
log.Debug("Invalid oauth provider: ", provider)

server/oauth/oauth.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ func InitOAuth() error {
130130
AuthURL: "https://appleid.apple.com/auth/authorize",
131131
TokenURL: "https://appleid.apple.com/auth/token",
132132
},
133+
Scopes: []string{"name%20email"},
133134
}
134135
}
135136

0 commit comments

Comments
 (0)