Uncaught (in promise) Error: invalid state in Firefox
qimolin opened this issue · 0 comments
qimolin commented
Describe the problem
After authenticating and refreshing the page I get Uncaught (in promise) Error: invalid state in Firefox but everything seems to work fine. I only get this on Firefox (tested on Chrome and it worked fine). This is the error I get:
Edit: I think it has to do with the url http://localhost:5173/?code=MjIivCvqbQsTeG_VW93NB5eVGnmmvzmuHIeY5vdb1ODmz&state=SnhzX1FZRmpWTzFzaE10b0d5Yi1TVWpTR3JCOGRjVC1ERzhVRmZTYmdvRA%3D%3D. Specifically the part after the / when I am logged in this gets added the first time the page is loaded.
What was the expected behavior?
No error messages in the console after reload of the page.
Reproduction
- Step 1. Add authentication to the app
- Step 2. Add the following code to the vue router:
router.beforeEach(async (to) => {
const canAccess = await authGuard(to);
return canAccess;
});
- Step 3. Login with an account
- Step 4. Reload the page and check the console
Environment
- Version of
auth0-vue
used: 2.0.0 - Version of
vue
used: 3.2.45 - Which browsers have you tested in? Firefox (worked in Chrome)
- Other modules/plugins/libraries that might be involved: auth0-spa-js