The issue happens with any kind of login being used in Auth0 whether Google or Linkedin to sign in it works fine in a normal Browser but not in incognito
Video showing how it behaves in incognito is as below
The video shows an authorization code (a different one) being returned to what’s likely the application configured callback URL. Given that after you authenticate there’s a session established in the Auth0 tenant/domain which may be reused for subsequent login requests the most likely reason for this situation is the client application logic having an issue that prevents it from completing the login flow and because of that redirecting again to login.
The loop is triggered because the application continuously redirects to login while the Auth0 tenant domain continuously responds with a success response as the user already authenticated and a session exists.
Given this is triggered by something the application logic does in order to troubleshoot this you will need to review the application logic itself. A good starting point would be to capture an HTTP trace of a working login and also of a failed one (the loop thing); once you have that you would do a comparison check to see if there’s anything different at the network level (for example, are there cookies present in the requests associated with the client application in the working one, but not in the failed one).
@jmangelo Our implementation is with Angular and auth0. We followed the same steps given https://auth0.com/docs/quickstart/spa/angular2/01-login and used the same code template handleAuthCallback for handling callback, nothing extra is added there. During debugging this, I found that, the redirect callback handler handleRedirectCallback of SDK doesn’t complete the the redirect flow and redirects to login again which cause the loop cycle.
The best way to review this would be with live debugging like it has been mentioned. In particular, trying to understand why the redirect callback handler does not complete as expected in incognito. There isn’t any messages printed to the console?
Also does this only happen with the LinkedIn connection or it’s the same if you try username/password login? If it happens with username/password would it be possible for you to share test credentials?
Actually just discovered this thread after creating my own. I’m experiencing the exact same issue.
React + auth0-react v1.4.0
Works fine in Firefox (regular/private), chrome (regular), but broken in incognito!
Update: I’ve managed to isolate the infinite loop in a separate react-app. Hopefully the auth0 guys can spot the issue and it’ll provide a solution to the people in this thread too.
We are having the same issue with @auth0/auth0-angular 1.5.0 and @auth0/auth0-spa-js 1.5.0. Everything works fine in edge and firefox but fails in chrome incognito. It would be nice to get some attention on this.
EDIT: In my case it was beceause I was calling getAccessTokenSilently() before handleRedirectCallback() finished.