Skip to content

Commit

Permalink
fix(provider): okta client authentication (#1257)
Browse files Browse the repository at this point in the history
* fix: okta client authentication

* chore: run lint fix

* Update pages/api/auth/[...nextauth].js

Co-authored-by: Balázs Orbán <info@balazsorban.com>

Co-authored-by: mgraser <matt.graser@mlb.com>
Co-authored-by: Balázs Orbán <info@balazsorban.com>
  • Loading branch information
3 people committed Feb 4, 2021
1 parent c7f1923 commit cb6f787
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/lib/oauth/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async function getOAuth2AccessToken (code, provider, codeVerifier) {
headers.Authorization = 'Basic ' + Buffer.from((provider.clientId + ':' + provider.clientSecret)).toString('base64')
}

if ((provider.id === 'okta' || provider.id === 'identity-server4') && !headers.Authorization) {
if (provider.id === 'identity-server4' && !headers.Authorization) {
headers.Authorization = `Bearer ${code}`
}

Expand Down

1 comment on commit cb6f787

@OlgitH
Copy link

@OlgitH OlgitH commented on cb6f787 Feb 10, 2021

Choose a reason for hiding this comment

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

Hi I am still having issues logging in with later versions of next-auth, using okta provider:
https://stackoverflow.com/questions/66037028/error-when-using-okta-authentication-with-next-auth
I have tried with next v3.3.0. It works with version next-auth v3.0.0 but not with later versions.

Please sign in to comment.