State Not Found
Hey folks, I'm getting this error here on Vercel Preview deployments. Prod seems to be fine. Wondering if anyone can help.
{"error":"Error: State not found.\nTo resolve this error please visit our docs https://docs.kinde.com/developer-tools/sdks/backend/nextjs-sdk/#state-not-found-errorAuthentication flow: Received: 5bb2f205dff994476b08d5fa2982 | Expected: State not found"}
I do have the the following on my next.config.mjs:
/** @type {import('next').NextConfig} */
const nextConfig = {
env: {
KINDE_SITE_URL:
process.env.KINDE_SITE_URL ??
KINDE_POST_LOGOUT_REDIRECT_URL:
process.env.KINDE_POST_LOGOUT_REDIRECT_URL ??
KINDE_POST_LOGIN_REDIRECT_URL:
process.env.KINDE_POST_LOGIN_REDIRECT_URL ??
},
};
export default nextConfig;
{"error":"Error: State not found.\nTo resolve this error please visit our docs https://docs.kinde.com/developer-tools/sdks/backend/nextjs-sdk/#state-not-found-errorAuthentication flow: Received: 5bb2f205dff994476b08d5fa2982 | Expected: State not found"}
I do have the the following on my next.config.mjs:
/** @type {import('next').NextConfig} */
const nextConfig = {
env: {
KINDE_SITE_URL:
process.env.KINDE_SITE_URL ??
https://${process.env.VERCEL_URL},KINDE_POST_LOGOUT_REDIRECT_URL:
process.env.KINDE_POST_LOGOUT_REDIRECT_URL ??
https://${process.env.VERCEL_URL},KINDE_POST_LOGIN_REDIRECT_URL:
process.env.KINDE_POST_LOGIN_REDIRECT_URL ??
https://${process.env.VERCEL_URL}/experiments,},
};
export default nextConfig;
Kinde docs
Our developer tools provide everything you need to get started with Kinde.
