-
Notifications
You must be signed in to change notification settings - Fork 226
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
Infinite redirect loops #1719
Comments
I guess the |
Hi @jochen-lise - I tried reproducing this in the sample repo, which uses In addition to the debug logging that @pamapa mentioned, could you try reproducing your issue in that sample repo please? |
Interesting. I dropped my kc version down from 26.0.2 to 26.0.0 but was still not able to reproduce with the included react sample app. Reviewing your original snippet, I wonder about this block, if it's causing the infinite loop, since if not auth'd then redirect to home, which will check if not auth'd, then again and again. if (!auth.isAuthenticated) {
return <Navigate to="/" />;
} Could you try changing it to something like this, without the redirect, just to see what happens? if (!auth.isAuthenticated) {
return <div>Unable to sign in</div>;
} |
If you open an issue on the sample app repo with your error details, I'd be glad to look into it with you. |
I also experienced this issue but instead of this happening on Chrome its happens on Firefox only. As I debugged this it seems that the Authentication is first up fine until the Page loads, but then I get a state update from When I set the mentioned flag We are using
currently just for reference. Sadly I also cannot affort an small example repository to reproduce this, but maybe this helps anyone in the future. |
Hello, we are getting redirect loops on our local developer machines. We use
react-oidc-context
andoidc-client-ts
in combination with Keycloak. I could track it down to themonitorSession
flag. if this flag is true, we get the redirect loop asauth.isAuthenticated
turns "false" for unknown reason.For unknown reason as well, this is only in Chrome (v129+) but not in Chrome Incognito Mode or i.e. Firefox. It also is only on localhost and not on our Staging or Prod env.
It is a persistent problem on multiple developer machines (Windows & Mac) and resetting / deleting cache, cookies, storages does not help.
We did update to Keycloak v26 yesterday, but as other browsers are not affected, i think that is a cold trace.
Any ideas what the problem is or what we can try to figure this one out?
The text was updated successfully, but these errors were encountered: