react-oidc-context
react-oidc-context copied to clipboard
doc(readme): add auth.error check to auto sign in
- add
auth.errorto auto login to prevent infinite loop when request fails
I had this problem when I got a CORS error. Therefore an endless loop was triggered during auto login
Checklist
- [ ] This PR makes changes to the public API
- [ ] I have included links for closing relevant issue numbers
Thanks for reporting back and improving the docs.
I thought hasTriedSignin would take care of endless loops, maybe we just need to flip the sequence?
auth.signinRedirect();
setHasTriedSignin(true);
->
setHasTriedSignin(true);
auth.signinRedirect();