Skip to content

Commit

Permalink
fix: update Okta routes (#763)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ohheyalanray authored and balazsorban44 committed Feb 1, 2021
1 parent 672cedc commit 8a6f094
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/providers/okta.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export default (options) => {
client_secret: options.clientSecret
},
// These will be different depending on the Org.
accessTokenUrl: `https://${options.domain}/oauth2/v1/token`,
authorizationUrl: `https://${options.domain}/oauth2/v1/authorize/?response_type=code`,
profileUrl: `https://${options.domain}/oauth2/v1/userinfo/`,
accessTokenUrl: `https://${options.domain}/v1/token`,
authorizationUrl: `https://${options.domain}/v1/authorize/?response_type=code`,
profileUrl: `https://${options.domain}/v1/userinfo/`,
profile: (profile) => {
return { ...profile, id: profile.sub }
},
Expand Down

1 comment on commit 8a6f094

@miguelguadarrama
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.