razer293
razer293
KKinde
Created by razer293 on 12/6/2024 in #💻┃support
Subdomain Authentication
Hello, I am trying to work through a solution where I have a user click the RegisterLink from "@kinde-oss/kinde-auth-nextjs/components" on www.mysite.com, which will authenticate them on www.app.mysite.com. When developing locally I have the following env: KINDE_COOKIE_DOMAIN=.localhost:3000 KINDE_SITE_URL="http://localhost:3000" KINDE_POST_LOGOUT_REDIRECT_URL="http://app.localhost:3000" KINDE_POST_LOGIN_REDIRECT_URL="http://app.localhost:3000/new" Allowed Callbacks: http://app.localhost:3000/api/auth/kinde_callback, http://localhost:3000/api/auth/kinde_callback, I keep getting the error - This page could not be found. I have tried different combinations of the envs, I have also set the NextJS config to: 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}/new, },
2 replies