# Invalid token - \`state\` does not match

**URL:** <https://community.auth0.com/t/invalid-token-state-does-not-match/13667>\
**Category:** Get Help\
**Created:** [July 26, 2018, 5:58am UTC](https://community.auth0.com/t/invalid-token-state-does-not-match/13667 "2018-07-26T05:58:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chintandbhatt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chintandbhatt/32/16424_2.png) [@chintandbhatt](https://community.auth0.com/u/chintandbhatt)\
**Post date:** [July 26, 2018, 5:58am UTC](https://community.auth0.com/t/invalid-token-state-does-not-match/13667/1 "2018-07-26T05:58:25Z")

</div>

I am actually using the angular2+ sample application only from

[https://github.com/auth0-samples/auth0-angular-samples/tree/master/01-Login](https://github.com/auth0-samples/auth0-angular-samples/tree/master/01-Login)

Authentication works fine with one test account but throws an error “Invalid token - `state` does not match” for other.

state is being passed correctly but what comes back from auth0 in callback is different compare to what is been stored in localStorage.

No code changes, Only difference is other account users “google login” and if that is the cause I am not sure how to fix it ?

---

<div class="post-metadata">

**Author:** ![kimcodes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kimcodes/32/81052_2.png) [@kimcodes](https://community.auth0.com/u/kimcodes)\
**Post date:** [September 6, 2018, 5:27pm UTC](https://community.auth0.com/t/invalid-token-state-does-not-match/13667/3 "2018-09-06T17:27:33Z")

</div>

👋 @chintandbhatt Were you able to solve your issue?

Have you setup Google to use your own keys instead of the built-in developer keys? If not, can you try setting these and see how that works? If you keep getting the wrong `state` after that, can you record a [.HAR file](https://auth0.com/docs/har) for a login attempt?

---

<div class="post-metadata">

**Author:** ![kimcodes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kimcodes/32/81052_2.png) [@kimcodes](https://community.auth0.com/u/kimcodes)\
**Post date:** [November 22, 2018, 8:11pm UTC](https://community.auth0.com/t/invalid-token-state-does-not-match/13667/4 "2018-11-22T20:11:32Z")

</div>


