This issue is related to #514 , just a more complex scenario:
- Single Page App with Firebase & Auth0 integration (only authenticated mode)
- On load the app makes request to protected Firebase endpoint and catches authentication exception:
- More reliable than dealing with token expiry / local storage, if Firebase says we need to authenticate then we need to authenticate, no matter the underlying cause.
- Firebase authentication exception triggers Auth0 Lock window display.
- User provides credentials.
- Auth0 performs authentication and redirects back to app.
- Firebase request goes out before the Auth0 token has been exchanged with Firebase and this triggers the Auth0 Lock window to display again.
Basically the problem is that the Single Page App doesn't know when Auth0 is about to redirect the user or that a page load was the result of a redirect. The "authenticated" and "hash_parsed" events are not enough if there is another asynchronous event involved (Firebase auth attempt in this case). The only workaround currently is: { auth: { redirect: false }, autoclose: true }
This issue is related to #514 , just a more complex scenario:
Basically the problem is that the Single Page App doesn't know when Auth0 is about to redirect the user or that a page load was the result of a redirect. The "authenticated" and "hash_parsed" events are not enough if there is another asynchronous event involved (Firebase auth attempt in this case). The only workaround currently is:
{ auth: { redirect: false }, autoclose: true }