Skip to content

Commit 8a6f094

Browse files
ohheyalanraybalazsorban44
authored andcommittedFeb 1, 2021
fix: update Okta routes (#763)
the current routing for the Okta provider does not follow the standard set by Okta, and as such doesn't allow for custom subdomains. this update amends the routes to allow for customer subdomains, and also aligns next-auth with Okta's documentation.
1 parent 672cedc commit 8a6f094

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/providers/okta.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export default (options) => {
1111
client_secret: options.clientSecret
1212
},
1313
// These will be different depending on the Org.
14-
accessTokenUrl: `https://${options.domain}/oauth2/v1/token`,
15-
authorizationUrl: `https://${options.domain}/oauth2/v1/authorize/?response_type=code`,
16-
profileUrl: `https://${options.domain}/oauth2/v1/userinfo/`,
14+
accessTokenUrl: `https://${options.domain}/v1/token`,
15+
authorizationUrl: `https://${options.domain}/v1/authorize/?response_type=code`,
16+
profileUrl: `https://${options.domain}/v1/userinfo/`,
1717
profile: (profile) => {
1818
return { ...profile, id: profile.sub }
1919
},

1 commit comments

Comments
 (1)

miguelguadarrama commented on Mar 19, 2021

@miguelguadarrama

Can I get some clarification here? I understand the logic behind this change, but then it means the "domain" variable would need to be something like "your-org.okta.com/oauth2" for the URLs to work which seems semantically incorrect, or am I missing something?

Please sign in to comment.