Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting 400 bad request pkce verification failed using okta sign in widget react #1527

Open
pream1234 opened this issue Jul 17, 2024 · 6 comments
Labels

Comments

@pream1234
Copy link

Describe the bug

I'm having issue with generating access tokens for users during the login process. While trying to login, request to https:///oauth2//token is sent. Sometimes it results in 400 Bad Request

Reproduction Steps?

Whenever we open new incognito tab for first time we are getting this issue . After refresh it works fine

SDK Versions

Okta-signin widget 7.20.1
Okta-authjs:7.7.0

Additional Information?

No response

@pream1234 pream1234 added the bug label Jul 17, 2024
@jaredperreault-okta
Copy link
Contributor

Tokens cannot be issued until a user has successfully authenticated.

Can you please elaborate on this comment

generating access tokens for users during the login process

Secondly, can you please provide code snippets or a sample repo?

@pream1234
Copy link
Author

@jaredperreault-okta Thanks for the quick response .basically we are having react spa where we are using okta sign-in widget using interaction code flow . Once the user enter username and password on click of sign-in I’m getting “oautherror:pkce verification failed “
IMG_1174

@pream1234
Copy link
Author

On click of refresh it login is successfully

@jaredperreault-okta
Copy link
Contributor

Secondly, can you please provide code snippets or a sample repo?

@pream1234
Copy link
Author

@jaredperreault-okta Attaching Coding snippets which we are using
image
image
image

@jaredperreault-okta
Copy link
Contributor

Is your onSuccess handler firing? If so, what is the value of tokens?

Optionally you could try showSignIn, rather than showSignInToGetTokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants