KindeK
Kinde7mo ago
5 replies
Maxime

Issue: production redirects to staging url

Hi,

We've been using Kinde for authentication in our Next.js app since the end of last year. The app is hosted in Azure as a Web App, and within this Web App we have both a staging and a production slot. Each slot has its own set of env variables, including:
KINDE_CLIENT_ID
KINDE_CLIENT_SECRET
KINDE_ISSUER_URL
KINDE_POST_LOGIN_REDIRECT_URL,
KINDE_POST_LOGOUT_REDIRECT_URL,
KINDE_SITE_URL,
KINDE_DOMAIN_URL,
NEXT_PUBLIC_SITE_URL,
...

Ealier today, after performing a swap between staging and production in Azure, we encountered an issue: when users try to log in to the production app, they are immediately redirected to staging, even before the Kinde login page appears. As a result, users end up on staging instead of production.

No changes were made on our side to the Kinde version or configuration in the app, and this setup used to work without issues.

Could this behavior be caused by some form of caching that persists across the Azure swap, potentially on Kinde's side? Or is there something else we might be missing that needs to be reset or reconfigured?

To clarify, both the staging and production slot of the webapp use the same "Production" environment from Kinde.

Thanks in advance for any help!
Was this page helpful?