Invalid State on subdomain login
hey folks, we are running into login issues on our development environments.
we use render and it automatically creates a deployment for our PR with the domain
https://admin-portal-pr-{number}.onrender.com
.
kinde is configured with https://admin-portal-*.onrender.com/
in allowed callback urls.
we have a custom domain setup for auth
for some reason, the deployments have "Invalid state" error in the console, and:
- login page does not show up if token is cached previously
- login page pops up, but then redirects to home with the error above, user is not logged in
nothing has changed in the auth code between the PR and production/local, where login works perfectly. would love input!4 Replies
update, auth does not work on
https://admin-portal-{uid}.onrender.com/
or https://admin-portal-pr-{uid}.onrender.com/
eitherThanks for raising this, which sdk are you using?
There are some docs for similar use cases here: https://kinde.com/docs/developer-tools/nextjs-sdk/#working-with-preview-urls
Kinde Docs
NextJS App Router SDK - Developer tools - Help center
Our developer tools provide everything you need to get started with Kinde.
Just the react SDK
I think its a bit weird to be using the API to add/remove dynamic urls using the API - we already have wildcard urls setup, shouldn't this work out of the box?