Infinite loop with already authenticated users
See original GitHub issuethe first time that an authenticated user (in azure ad) access my site, it will go through an infinite loop during the microsoft login, but the site will work fine if the user get in with an incognito tab.
If the user will be disconnected he will be able to access the site without the incognito tab e then it will work without problem.
My index.js:
ReactDOM.render(<AzureAD provider={authProvider} forceLogin={true}>
{({login, logout, authenticationState, error, accountInfo})=>{
if (authenticationState === AuthenticationState.Authenticated){
return (<App logout={logout} accountInfo={accountInfo && accountInfo.account.userName}/>)
}else if (authenticationState === AuthenticationState.Unauthenticated){
if (error) {
return (
<p>
<span>An error occured during authentication, please try again!</span>
<button onClick={login}>Login</button>
</p>
);
}
return (
<p>
</p>
);
}
}}
</AzureAD>, document.getElementById('root'));
config:
cache: { cacheLocation: "localStorage", storeAuthStateInCookie: true }
Any suggestion to discover the issue?
Is it a mine issue or it could be a bug?
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Getting infinite loop when adding Authentication
I have Authentication API (jwt) for authentication users. Using this for several clients and am in the process of adding the second client ......
Read more >Infinite loop after entering the credentials | Symantec Access ...
Another possible cause is that the the user is "Authenticated" via the authentication scheme, but not Authorized by policy, thus a loop.
Read more >Users Experiencing Infinite Loop When Accessing the Okta ...
After submitting credentials on the Okta login page, users are experiencing any infinite looping behavior and are not directed to the end-user dashboard....
Read more >AAD Authentication Infinite Loop - MSDN - Microsoft
When I run that project it prompts me for the authentication and after hitting sign in button, it goes into infinite loop.
Read more >Backend login in an infinite loop after changing Authentication ...
After changing the Authentication cookie security field, the backend login is stuck in an infinite loop. ... The field is located under Settings...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
These issues should have been addressed in the latest release of the library. There are some breaking changes which is why there was a major release update, and a number of follow up hot fixes applied. I’m closing this issue for now, but please let me know if you encounter any questions when upgrading.
Unfortunately these changes were rushed much faster than I would have liked due to immediate needs from multiple teams.
I do see an issue in our library code where if an error occurs during login (and forceLogin=true) the error is ignored and this can cause an infinite loop. I expect to have some PRs to fix this in the coming week.