Kinde OAuth "State not found" - Cookie present but state not decrypted
Hey! I'm facing an issue with Kinde OAuth authentication on my Nuxt 3 app in production (HTTPS + Nginx reverse proxy).
When I'm working locally, everything works fine, but when I launch it in production on an Ubuntu server with Docker, I can't connect. This issue varies depending on the computer. I tested it on a Mac with Safari, and it works. I tested it on my Windows machine, and I get the error. I don't get it on my phone, and some other people don't get it on Windows either. I don't understand it at all.
The project was working fine; I didn't change anything, but suddenly the cookies became inaccessible on some devices.
I'm providing the error message, and if anyone has any ideas, I'd appreciate it.

4 Replies
Console Docker :
✅ [Kinde Callback] Valid parameters received, forwarding to Kinde module…
[11:38:50.880] – State received: e6881ad968ae8f51cea59167ee51
[11:38:50.880] – Code received: 6zlUaJEAyFa-j0iKxol1NB1UNo539d…
[11:38:50.880] – Kinde cookie present: false
🚨 [Error Handler] Captured error:
🔐 [OAuth] Error during Kinde callback:
[request error] [unhandled] [GET]
https://bloom-beauty-nails.fr/api/callback?code=…&state=e6881ad968ae8f51cea59167ee51
[Kinde Error] 500 error detected on callback, likely due to a session/state issue
with : "@nuxtjs/kinde": "^0.1.11",
nuxt.config.ts :

Hey, thanks for reaching out and the details
From what I can see, the
500 error is coming from your Nuxt /api/callback route (the Kinde Nuxt module), not directly from Kinde. Kinde sends back the code and state, but the callback handler on your server fails.
Because it only happens on some devices (Safari OK, some Windows browsers not, phone OK), this is usually:
- old / broken cookies on those devices, or
- a change in your Kinde env vars (especially the session secret) so old cookies can’t be read anymore.
Could you try these steps:
1. Clear cookies on a device that fails
- In the browser, clear all cookies for your domain.
- Refresh and try logging in again.
If this fixes it, the problem was a stale session cookie.
2. Check your Kinde env vars in production
make sure these are set and use https and your real domain:
- NUXT_KINDE_AUTH_DOMAIN=https://<your-subdomain>.kinde.com
- NUXT_KINDE_CLIENT_ID
- NUXT_KINDE_CLIENT_SECRET
- NUXT_KINDE_REDIRECT_URL=https://yourdomain.com/api/callback
- NUXT_KINDE_LOGOUT_REDIRECT_URL=https://yourdomain.com
- NUXT_KINDE_POST_LOGIN_REDIRECT_URL=https://yourdomain.com/<after-login>
- NUXT_KINDE_PASSWORD=<long random string>
Important: NUXT_KINDE_PASSWORD must stay the same across deploys, otherwise existing cookies can’t be decrypted.
3. Check server logs
When you try to log in and see the 500, check your server / Docker logs for the error from /api/callback
---
Let me know if this helps, ThanksThank you for your reply. So, I checked my .env file, and I think everything is fine. I cleared my cache, but it still doesn't work; I'm still getting the same error. I'll show you my logs; does that give you any ideas?