From 415b97535e43679dcd9f8544fcd84bf6934c8c48 Mon Sep 17 00:00:00 2001 From: Lakhan Samani Date: Tue, 14 Jun 2022 15:05:56 +0530 Subject: [PATCH] fix: update scope param --- server/handlers/oauth_login.go | 2 +- server/oauth/oauth.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/server/handlers/oauth_login.go b/server/handlers/oauth_login.go index 3641f7e..0ec8784 100644 --- a/server/handlers/oauth_login.go +++ b/server/handlers/oauth_login.go @@ -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%20email")) + url := oauth.OAuthProviders.AppleConfig.AuthCodeURL(oauthStateString, oauth2.SetAuthURLParam("response_mode", "form_post")) + "&scope=name email" c.Redirect(http.StatusTemporaryRedirect, url) default: log.Debug("Invalid oauth provider: ", provider) diff --git a/server/oauth/oauth.go b/server/oauth/oauth.go index 067a098..9172890 100644 --- a/server/oauth/oauth.go +++ b/server/oauth/oauth.go @@ -130,7 +130,6 @@ func InitOAuth() error { AuthURL: "https://appleid.apple.com/auth/authorize", TokenURL: "https://appleid.apple.com/auth/token", }, - Scopes: []string{"name%20email"}, } }