CityOfLosAngeles / angeleno-my-account

App that allows Angeleno Account holders to update their profile, password, MFA, and app consent.
MIT License
1 stars 0 forks source link

Reoccurring Auth0 Invalid State Error #57

Closed cbhernan closed 9 months ago

cbhernan commented 10 months ago

Summary

There is a case where the page looks like it's stuck loading. If you open the console you'll see an error like Uncaught missing_transaction: Invalid state

Steps to reproduce

Returning to the app a day later, you'll see a code and state query parameter, but I believe it's missing a third query parameter that's required.

What is the current bug behavior?

Page is stuck in loading. The only workaround I know is to remove the query parameters and hit enter, then it loads up as expected. 🤔

What is the expected correct behavior?

User profile loads as expected.

Possible fixes

I believe the proper solution is to redirect the user to login again so that the token is refreshed, but I'm not 100% sure that this is the case since the application works as expected when we remove the query parameters.

Resources

https://community.auth0.com/t/invalid-state-on-reload-auth0-callback-url-using-auth0-spa-js-and-angular-8/36469/10 https://stackoverflow.com/questions/48271143/error-invalid-state-auth0