Welcome to the Kinde community

Updated 7 months ago

NextJS SDK needs documentation on custom domain

The Nextjs SDK documentation should have more documentation on how to implement custom domains for auth. I've asked here for support on it and have yet to find a solution, but even when I do, the docs should be a bit more helpful here.
O
J
2 comments
Hey @Jeremy,
Sorry that you have been experiencing issues with implementing custom domains for auth with your NextJS app.
I have passed on your feedback on documentation to my team mate who handles our docs.

I assume you have already setup your custom domain in the Kinde Admin.

From looking at the message in the past support thread here, I believe you are missing KINDE_COOKIE_DOMAIN in your .env file.

So I would suggest having a read of this section of the NextJS docs.

Please let me know if you are still experiencing issues.
Thank you, I think I finally got it working as well as I can. I did the cookie thing, but importantly only had to set that on my vercel dev env (not preview envs, prod, or local). Also I was getting mixed up with VERCEL_URL and VERCEL_BRANCH_URL. Following the custom domain and preview docs, that implements VERCEL_URL, which is not what the Vercel Github bot uses. I added a comment here: https://github.com/kinde-oss/kinde-auth-nextjs/issues/86#issuecomment-2064915911

I think I'm good now I'm just trying to elaborate in case you want to add to the docs the difference between VERCEL_URL and VERCEL_BRANCH_URL. And that you can not get both to work, because the env vars are set at build time so you can't dynamically figure out which host the user is using.
Add a reply
Sign up and join the conversation on Discord