Skip to content

Commit eab336c

Browse files
committed
fix: apple login params
1 parent f4691fc commit eab336c

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
@@ -6,6 +6,7 @@ import (
66

77
"github.com/gin-gonic/gin"
88
log "github.com/sirupsen/logrus"
9+
"golang.org/x/oauth2"
910

1011
"github.com/authorizerdev/authorizer/server/constants"
1112
"github.com/authorizerdev/authorizer/server/memorystore"
@@ -170,7 +171,7 @@ func OAuthLoginHandler() gin.HandlerFunc {
170171
c.Redirect(http.StatusTemporaryRedirect, url)
171172
case constants.SignupMethodApple:
172173
if oauth.OAuthProviders.AppleConfig == nil {
173-
log.Debug("Linkedin OAuth provider is not configured")
174+
log.Debug("Apple OAuth provider is not configured")
174175
isProviderConfigured = false
175176
break
176177
}
@@ -183,7 +184,7 @@ func OAuthLoginHandler() gin.HandlerFunc {
183184
return
184185
}
185186
oauth.OAuthProviders.AppleConfig.RedirectURL = hostname + "/oauth_callback/" + constants.SignupMethodApple
186-
url := oauth.OAuthProviders.AppleConfig.AuthCodeURL(oauthStateString)
187+
url := oauth.OAuthProviders.AppleConfig.AuthCodeURL(oauthStateString, oauth2.SetAuthURLParam("response_mode", "form_post"))
187188
c.Redirect(http.StatusTemporaryRedirect, url)
188189
default:
189190
log.Debug("Invalid oauth provider: ", provider)

0 commit comments

Comments
 (0)