# "State parameter is invalid" error occuring randomly

**URL:** <https://community.auth0.com/t/state-parameter-is-invalid-error-occuring-randomly/182676>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [February 24, 2025, 12:44am UTC](https://community.auth0.com/t/state-parameter-is-invalid-error-occuring-randomly/182676 "2025-02-24T00:44:33Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![lribas](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@lribas](https://community.auth0.com/u/lribas)\
**Post date:** [February 24, 2025, 7:31pm UTC](https://community.auth0.com/t/state-parameter-is-invalid-error-occuring-randomly/182676/4 "2025-02-24T19:31:53Z")

</div>

@mmaccou I just find out the solution to my issue, it may be similar to yours. In my case, the origin url was not matching the callback url. Every time the testing env was being accessed with a www in front of url, the state was being stored in a cookie store with 'www.\*'in the beginning, causing the comparison between the state in the call back response. So there was nothing to do with browser or sdk version, but with the way user’s were accessing the app.

Hope it helps.  
Best regards

---

_[View the full topic](https://community.auth0.com/t/state-parameter-is-invalid-error-occuring-randomly/182676)._
