Closed Naught0 closed 3 years ago
I have run into the same issue, however previous version 3.0.8
seems to be working fine
@Naught0 Can you confirm whether this issue also appears when using version 3.0.8?
Also, we have made some fixes related to this issue with the auth-js library which okta-react depends on. To make sure you have these updates, wipe your node_modules and any lock files and do a fresh install.
@aarongranick-okta I've just downgraded to 3.0.8
and everything is working just as expected now! Is there anything I can do to help you identify the cause?
@Naught0 We have identified a flaw in 3.0.9 which causes a flood of requests to /authorize
when navigating to a secure route. My guess is this is also the cause of the mismatched response state. If you see in your network tab more than one request to /authorize
then this is probably the source of the issue. We are working on a fix and will release it soon as 3.0.10
I'm submitting this issue for the package(s):
I'm submitting a:
Current behavior
<Link>
ing to a<SecureRoute>
fails after the Okta login is triggered with error:AuthSdkError: OAuth flow response state doesn't match request state
If I navigate back to/
, I'm signed in and everything works just fine.Expected behavior
From: https://developer.okta.com/code/react/okta_react/#connect-the-routes
Minimal reproduction of the problem with instructions
I attempted to use one of the samples to provide an example however I ran into another issue: https://github.com/okta/samples-js-react/issues/145#issuecomment-725445390 The basic structure is thus:
With
Home
linking to the<SecureRoute>
like so:Environment