Welcome to the Kinde community.

A
A
A
M
T

Authentication Flow Error: State Not Found

In the production environment, we’re seeing this error after entering the verification code:

Authentication flow: Received: 9519adf9be46e35561aa1e1765dd | Expected: State not found

K
1 comment

The error message "Authentication flow: Received: 9519adf9be46e35561aa1e1765dd | Expected: State not found" indicates that the `state` parameter received during the authentication callback does not match any stored `state` value in your application. This mismatch can occur due to several reasons: 1. *State Parameter Mismatch*: Ensure that the `state` parameter you send when initiating the authentication request is the same as the one you validate upon receiving the callback. The `state` parameter should be a unique, non-guessable value stored securely in your application. 2. *Storage Issues*: Depending on your application type, the `state` parameter should be stored appropriately: • *Regular Web App*: Use cookies or session storage. • *Single Page Application (SPA)*: Use local storage. • *Native App*: Use memory or local storage. 3. *State Parameter Expiry*: Ensure that the `state` parameter has not expired or been overwritten before the callback is received. 4. *CSRF Protection*: The `state` parameter is used to protect against CSRF attacks. Make sure it is unique and opaque. For more detailed guidance on using the `state` parameter, you can refer to the documentation.

Add a reply
Sign up and join the conversation on Slack
Join