Invalid KINDE_REDIRECT_URL: Invalid URL
I keep getting this message and it's self-explanatory but I have the correct url entered in my env file like this :
http://localhost:5173/api/auth/callback
I created the folder/file inside the api/[...KindeAuth]/callback/+page.svelte
I also entered that in the app dashboard admin section in kinde.com Yet, I keep getting the invalide kinde_redirect_url : invalid url?? Here is my whole env file : KINDE_AUDIENCE=your_kinde_api KINDE_CLIENT_ID=fab961ce34da KINDE_CLIENT_SECRET=CWzom KINDE_ISSUER_URL=https://sveltek.kinde.com KINDE_POST_LOGIN_REDIRECT_URL=http://localhost:5173/api/auth/callback KINDE_POST_LOGOUT_REDIRECT_URL=http://localhost:5173 KINDE_REDIRECT_URL=http://localhost:5173/api/auth/callback KINDE_SCOPE=profile email offline openid KINDE_USER_EMAIL_TEST= // An user has existed in your organization KINDE_USER_PASSWORD_TEST= KINDE_AUTH_WITH_PKCE= KINDE_DEBUG=false
I also entered that in the app dashboard admin section in kinde.com Yet, I keep getting the invalide kinde_redirect_url : invalid url?? Here is my whole env file : KINDE_AUDIENCE=your_kinde_api KINDE_CLIENT_ID=fab961ce34da KINDE_CLIENT_SECRET=CWzom KINDE_ISSUER_URL=https://sveltek.kinde.com KINDE_POST_LOGIN_REDIRECT_URL=http://localhost:5173/api/auth/callback KINDE_POST_LOGOUT_REDIRECT_URL=http://localhost:5173 KINDE_REDIRECT_URL=http://localhost:5173/api/auth/callback KINDE_SCOPE=profile email offline openid KINDE_USER_EMAIL_TEST= // An user has existed in your organization KINDE_USER_PASSWORD_TEST= KINDE_AUTH_WITH_PKCE= KINDE_DEBUG=false
2 Replies
Yes, I did. Are you familiar with sveltekit?
The issue was because of the .env file.
I'm using vs code. When I created the .env file, I hit enter to start a new line. That empty space is the issue. When you create your .env file in sveltekit, just copy and paste. No empty spaces, tab, or enter. Just copy from your dashboard, create .env, paste, save. It wasn't the KINDE sdk. Once I fixed the .env, I was authenticating users in less than 5 mintues by following their excellent docs : https://docs.kinde.com/developer-tools/sdks/backend/sveltekit-sdk/ Good job Kinde team. A really great product.
I'm using vs code. When I created the .env file, I hit enter to start a new line. That empty space is the issue. When you create your .env file in sveltekit, just copy and paste. No empty spaces, tab, or enter. Just copy from your dashboard, create .env, paste, save. It wasn't the KINDE sdk. Once I fixed the .env, I was authenticating users in less than 5 mintues by following their excellent docs : https://docs.kinde.com/developer-tools/sdks/backend/sveltekit-sdk/ Good job Kinde team. A really great product.