-
Notifications
You must be signed in to change notification settings - Fork 80
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
The SecureRoute component will not load if "code=" is present in url #258
Comments
I think you have been seeing this bug in other places. |
Can't reproduce your issue with just using |
How are you handling the application redirect (aka LoginCallback)? via the isLoginCallback (which is used by The easiest path forward would be to use a different query parameter name. If that's not possible we will need a bit more information regarding how you're handling the redirect |
Can you also paste your authjs (OktaAuth) config? (Please remove sensitive fields like |
Describe the bug
We have been using okta for authorization for a few years now with React Router 5, React 16, and the Okta provided
SecureRoute
component.We have a search form that sets the search params into the url and will derive current search parameters for the the query params in the url.
we have discovered that one of the parameters in the URL "code=" will result in a plank page on a refresh.
If the url has "codee=" or just "code" the page will load without error.
After a lot of debugging it is clear that the SecureRoute component is causing this behavior.
Reproduction Steps?
You can replicate this by going to any page using
SecureRoute
to render the route and type "code=" or "?code=",(depending on your route restrictions) and hit enter to load that new url.
This will happen if the user has an working okta token or not.
The page will not load.
Because of the nature of the site I am working on I can not share any screen shots or the url I am working without permission.
SDK Versions
Additional Information
No response
The text was updated successfully, but these errors were encountered: