# : mismatching\_state: CSRF Warning! State not equal in request and response

**URL:** <https://community.auth0.com/t/mismatching-state-csrf-warning-state-not-equal-in-request-and-response/152775>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [November 24, 2024, 4:51pm UTC](https://community.auth0.com/t/mismatching-state-csrf-warning-state-not-equal-in-request-and-response/152775 "2024-11-24T16:51:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jens1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jens1/32/62631_2.png) [@jens1](https://community.auth0.com/u/jens1)\
**Post date:** [November 24, 2024, 4:51pm UTC](https://community.auth0.com/t/mismatching-state-csrf-warning-state-not-equal-in-request-and-response/152775/1 "2024-11-24T16:51:46Z")

</div>

Hi,

I’ve been working on my Flask (with the Auth0 example) app for a while. I pushed it to DigitalOcean and started receiving this error when users tried to log in: “mismatching\_state: CSRF Warning! State not equal in request and response.” What way would be the easiest way to solve it? Or is a a non Auth0 related issue?

---

<div class="post-metadata">

**Author:** ![Fario\_Consulting](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/fario_consulting/32/60590_2.png) [@Fario\_Consulting](https://community.auth0.com/u/Fario_Consulting)\
**Post date:** [November 25, 2024, 11:18am UTC](https://community.auth0.com/t/mismatching-state-csrf-warning-state-not-equal-in-request-and-response/152775/2 "2024-11-25T11:18:12Z")

</div>

Hi,  
Could make sure the session and security token configurations are consistent across your local and DigitalOcean environments.  
Also check the Auth0 setup…ensure the state tokens are being stored and retrieved correctly without any alterations due to differences in cookie management  
Cheers,  
Harsh

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 21, 2025, 7:33pm UTC](https://community.auth0.com/t/mismatching-state-csrf-warning-state-not-equal-in-request-and-response/152775/3 "2025-03-21T19:33:30Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
