Custom Domain is not working

I use NextJS SDK to create the Login & Register link. I got the custom domain set and it shows DNS details is "Verified" and SSL certificate is "Provisioned" (as attached) and wait for days.. but the login link still redirect me to: [mysite].kinde.com/auth/xxxxxxxx. Any steps I missed?? I tried: redeploy, reset the DNS CNAME (in namecheap) from the beginning, use vercel DNS instead of namecheap, but all are unfortunately not working.
No description
7 Replies
Daniel_Kinde
Daniel_Kinde5mo ago
When you say your redirect takes you to your site.kinde.com, could you expand this please?
tommyhodev
tommyhodevOP5mo ago
Alright. So the login link href is to [mysite]/api/auth/login. After clicking it, it just land to xxx.kinde.com/auth/cx/_:nav&m:login&psid:xxxxxxx
tommyhodev
tommyhodevOP5mo ago
if these help
No description
No description
tommyhodev
tommyhodevOP5mo ago
I can provide the raw HAR content privately if you need
onderay
onderay5mo ago
Are you able to double check the following for us? Update Your Application Configuration: Make sure your application is configured to use the custom domain. This includes updating the environment variables and any relevant configuration files. Set Callback and Redirect URLs: Ensure that the callback and logout redirect URLs in your Kinde settings are updated to use your custom domain. This can be done in the Kinde dashboard under Settings > Applications > [your app] > View details. Check Your NextJS Configuration: Verify that your next.config.js and .env files are correctly set up to use the custom domain. For example, your next.config.js should include:

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}/dashboard`
}
};
module.exports = 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}/dashboard`
}
};
module.exports = nextConfig;
tommyhodev
tommyhodevOP5mo ago
thanks for the hints. It was the KINDE_ISSUER_URL, my bad. I thought the kinde server would auto redirect me to the custom domain. Anyway it's much better if it's mentioned on the kinde doc: https://docs.kinde.com/build/domains/pointing-your-domain/ Thanks a lot
Kinde docs
Use your own custom domain
Our developer tools provide everything you need to get started with Kinde.
onderay
onderay5mo ago
Awesome to hear you got a solution! And thanks for the doc feedback, I will find a way to get it added
Want results from more Discord servers?
Add your server