KINDE_SITE_URL for Org handles and subdomains
How should I setup the KINDE_SITE_URL to work with subedomains and Org handles?
Current Setup
Currently I have setup
KINDE_SITE_URL=https://tenant1.lvh.me:3000
and this works great for a single tenant/subdomain, but ideally this is dynamic based on the current subdomain the user is on. For example
* https://tenant1.lvh.me:3000
* https://tenant2.lvh.me:3000
Within Kinde settings my Allowed callback URLs is https://{organization.handle}.lvh.me:3000/api/auth/kinde_callback
Issue
When I remove tenant1
, I get the 'Invalid callback URL' error because it provided https://lvh.me:3000/api/auth/kinde_callback
. My expected result is that it should pass the subdomain aswel, resuling in https://tenant1.lvh.me:3000/api/auth/kinde_callback
Question
How should I setup KINDE_SITE_URL to properly work with subdomain routing?1 Reply
I have been looking into this this.
KINDE_SITE_URL will need to be
https://lvh.me:3000/api/auth/kinde_callback
on the LoginLink
component you can pass a postLoginRedirectUrl
, this would be the URL you want to direct the user to post login with the org handle included.
Does this sound like it will solve your problem?