# The state param key is invalid when login using google on a webview (instagram)

**URL:** <https://community.auth0.com/t/the-state-param-key-is-invalid-when-login-using-google-on-a-webview-instagram/187504>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [June 2, 2025, 8:50pm UTC](https://community.auth0.com/t/the-state-param-key-is-invalid-when-login-using-google-on-a-webview-instagram/187504 "2025-06-02T20:50:01Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![gerald.czifra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gerald.czifra/32/75301_2.png) [@gerald.czifra](https://community.auth0.com/u/gerald.czifra)\
**Post date:** [June 3, 2025, 9:51pm UTC](https://community.auth0.com/t/the-state-param-key-is-invalid-when-login-using-google-on-a-webview-instagram/187504/3 "2025-06-03T21:51:12Z")

</div>

Hi @sebastian-simionescu

Welcome to the Auth0 Community!

The error that you encounter can have multiple causes, but in general, the `state` value that the application generates during the login flow does not match with the `state` value returned by Auth0 after authentication. Some of the potential causes of this happening can include :

- a URL mismatch, typically caused by the addition/subtraction of ’ www '. This has been mentioned by a user in the [following post](https://community.auth0.com/t/state-parameter-is-invalid-error-occuring-randomly/182676/4), which was the cause of the error in question in that particular case, which is similar to the issue that you encounter;
- the **webview** could manage the session differently or it has a shorter lifetime than a browser session;
- it’s probably not the case, but a long inactivity time in the webview ( the user sitting on the login page without interaction ) can also invalidate the original `state`

Let me know if you were able to pin point the issue and if it’s still ongoing for you. Any updates on the matter could help further track down the cause for this behaviour.

Best regards,  
Gerald

---

_[View the full topic](https://community.auth0.com/t/the-state-param-key-is-invalid-when-login-using-google-on-a-webview-instagram/187504)._
