fix: update scope for apple login
This commit is contained in:
parent
c9ba0b13f8
commit
7d1272d815
|
@ -185,7 +185,7 @@ func OAuthLoginHandler() gin.HandlerFunc {
|
||||||
}
|
}
|
||||||
oauth.OAuthProviders.AppleConfig.RedirectURL = hostname + "/oauth_callback/" + constants.SignupMethodApple
|
oauth.OAuthProviders.AppleConfig.RedirectURL = hostname + "/oauth_callback/" + constants.SignupMethodApple
|
||||||
// Scope from the root config was not passed for apple login
|
// 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)
|
c.Redirect(http.StatusTemporaryRedirect, url)
|
||||||
default:
|
default:
|
||||||
log.Debug("Invalid oauth provider: ", provider)
|
log.Debug("Invalid oauth provider: ", provider)
|
||||||
|
|
|
@ -130,6 +130,7 @@ func InitOAuth() error {
|
||||||
AuthURL: "https://appleid.apple.com/auth/authorize",
|
AuthURL: "https://appleid.apple.com/auth/authorize",
|
||||||
TokenURL: "https://appleid.apple.com/auth/token",
|
TokenURL: "https://appleid.apple.com/auth/token",
|
||||||
},
|
},
|
||||||
|
Scopes: []string{"name%20email"},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user