You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is expected as the auth flow expects to only be running once at a time. However with React18 in development mode every effect is run twice as documented here. As a result the issue must be resolved within this package.
Reproduction Steps?
I've created a reproducer here on codesandbox however it's a bit annoying to use as you have to enter your okta instance information to use it effectively.
A stripped down reproducer is as follows(note you must use React18 and have dev mode on):
Describe the bug
Calling
oktaAuth.handleLoginRedirect()
multiple times before in a row will causeparseFromUrl
within okta-auth-js to throw.This is expected as the auth flow expects to only be running once at a time. However with React18 in development mode every effect is run twice as documented here. As a result the issue must be resolved within this package.
Reproduction Steps?
I've created a reproducer here on codesandbox however it's a bit annoying to use as you have to enter your okta instance information to use it effectively.
A stripped down reproducer is as follows(note you must use React18 and have dev mode on):
SDK Versions
Additional Information
A potential solution to this issue is as follows and is based off of React's example of how to handle app initialization
I'm happy to open a PR with that change but unsure if that's the approach you'd like. Thank you for taking the time to read through this issue 😸
The text was updated successfully, but these errors were encountered: