Auth0 Home Blog Docs

Authentication Error: Invalid token 'state' does not match



I’ve been struggling to find the cause of this issue. When running the authentication locally, I have not issue with authentication. It comes right back. When deployed within a Docker container in AWS, on every first attempt to authentication I get Invalid_token ‘state’ does not match. When I re-attempt the login, it works fine.

What is causing this error? I am running with Auth0-js v8.12.2 using Hosted Login.


i’ve had a similar problem with a Vue.js app. Apparently inconsistently i am unable to log in and receive that same error: “Authentication Error: Invalid token ‘state’ does not match”.

Upon trying again it works fine.