K
Kindeβ€’4mo ago
DuocNgo

Vercel deployment - Invalid callback url

Hi team, i just tried to deploy my app to vercel with kinde auth. after follows all the steps on your youtube channel, but still get the error invalid callback url. P/s: i update env and url settings on project already, is there any solution. thanks in advance
46 Replies
Daniel_Kinde
Daniel_Kindeβ€’4mo ago
Hi, have you setup the callback URLs in the kinde dashboard for the application you're using?
DuocNgo
DuocNgoβ€’4mo ago
yes, i set it up already. but still get invalid URL
DuocNgo
DuocNgoβ€’4mo ago
here is my setup, just follow the guide of your team on kinde youtube channel.
No description
DuocNgo
DuocNgoβ€’4mo ago
here is the error screen when i tried to login
No description
MALEV0L3NT
MALEV0L3NTβ€’4mo ago
Are you using next.js? I also had a little trouble getting this to work originally and can probably help guide you through it
DuocNgo
DuocNgoβ€’4mo ago
yes, i use nextjs 14 mate
MALEV0L3NT
MALEV0L3NTβ€’4mo ago
Which video did you follow? can you link it so I can see what you did?
DuocNgo
DuocNgoβ€’4mo ago
Kinde
YouTube
How to deploy a Kinde Next.js app with Vercel
Software engineer Peter takes you through how to deploy a Kinde app using Vercel, and covers the common pitfalls involved. 00:00 - App demo 0:46 - Creating a project on Vercel 1:19 - Initialising Github repo 2:49 - Setting up environment variables on Vercel 4:00 - Deploying and visiting the app on the Vercel Domain 5:13 - Updating environment ...
DuocNgo
DuocNgoβ€’4mo ago
here is the video i just follow
MALEV0L3NT
MALEV0L3NTβ€’4mo ago
Hm as far as I can tell that should be working. Stupid question - you hit save after you set the callback url in the Kinde dashboard? And your vercel env is set correctly?
DuocNgo
DuocNgoβ€’4mo ago
yes, save and change the ENV already. im not stupid as that mate :D. thanks for reply
MALEV0L3NT
MALEV0L3NTβ€’4mo ago
I didn't assume, nor insinuate that I think you're stupid. Sometimes with issues like this, simple things are missed or overlooked, I miss things like this all the time. It's always best to cover the simple bases first rather than digging into complex solutions when the issue is right under our noses.
DuocNgo
DuocNgoβ€’4mo ago
oh sorry for my reading mistake. i did all these stuffs but still get the error, and i have tried to searching for this term on google already but there is no answer for that. Maybe Kinde is quite new, i will try to do all the steps again. Again, Thanks Joel.
MALEV0L3NT
MALEV0L3NTβ€’4mo ago
Does it work for localhost?
DuocNgo
DuocNgoβ€’4mo ago
yes, it does.
MALEV0L3NT
MALEV0L3NTβ€’4mo ago
Have you tried something as simple as deleting the fuji-recipes entry from your callback settings in Kinde, then saving, then copying the url from the error screen back in? Sometimes computers are weird and things like that work lol
DuocNgo
DuocNgoβ€’4mo ago
i did it also, but still get it. tried to close browser, switch to use other browsers too, LoL πŸ˜‚
MALEV0L3NT
MALEV0L3NTβ€’4mo ago
I also tried to log in on your app and it still didn't work
DuocNgo
DuocNgoβ€’4mo ago
@Joel i just re-create the app and setup all the stuffs again. Now it works, thanks for your times Joel. Have a great day
MALEV0L3NT
MALEV0L3NTβ€’4mo ago
Computers are weird man, glad you got it working πŸ˜‚
Ash
Ashβ€’3mo ago
@DuocNgo hey man I'm facing the same issue, did you manage to know what the reason was? and by what do you mean by "re-create"ing the app?
DuocNgo
DuocNgoβ€’3mo ago
First step, just check your kinde app name in local and the one on your host, if they are not the same, you should create new kinde app and setup the config again, hope you will resolve the error soon.
Ash
Ashβ€’3mo ago
can you explain a little more please? I should compare my kinde project name to what in my code?
DuocNgo
DuocNgoβ€’3mo ago
can you show me the snapshot of kinde auth screen on your local app and the one on vercel or somewhere
Ash
Ashβ€’3mo ago
yeah sure, appreciate the help btw
No description
No description
No description
No description
DuocNgo
DuocNgoβ€’3mo ago
can i see the fullpage of the 1st picture
Ash
Ashβ€’3mo ago
No description
DuocNgo
DuocNgoβ€’3mo ago
let see the url, does it is the same with the link on your local environment?
Ash
Ashβ€’3mo ago
in development everything works
DuocNgo
DuocNgoβ€’3mo ago
yes, i understand, but when it navigate to the auth screen in dev env, please take a look at the url
https://chatspdfauth.kinde.com/
https://chatspdfauth.kinde.com/
does it is the same url on the development environment?
Ash
Ashβ€’3mo ago
https://chatspdfauth.kinde.com/ yup same thing
DuocNgo
DuocNgoβ€’3mo ago
do you use nextjs? at this modal which is the one do you choose to setup the kinde auth?
No description
Ash
Ashβ€’3mo ago
yeah I did
DuocNgo
DuocNgoβ€’3mo ago
did you choose back-end web? if not, you can add the new app with backend-end web type and setup the server again. and that is all steps i had done to make my app works on vercel mate.
Ash
Ashβ€’3mo ago
thanks man for me its backend and still didnt work but appreciate your help
peteswah
peteswahβ€’3mo ago
If you have updated environment variables on vercel, you will have to redeploy your application for the env variables to update - maybe that'll do it? Otherwise you might have to click save in the Kinde Settings after setting callback URLs
Ash
Ashβ€’2mo ago
@peteswah fixed thanks!
Lytemare
Lytemareβ€’2mo ago
I'm having the same trouble except I deployed my app on Amplify.
Daniel_Kinde
Daniel_Kindeβ€’2mo ago
Hi @Lytemare , Have you redeployed since updating your environment variables on Amplify?
Lytemare
Lytemareβ€’2mo ago
How did you fix the issue? Even after I redeploy get the same problem as above: invalid callback URL Unfortunately I cannot get it to work in Amplify under production. Works perfectly well locally when I test it.
Daniel_Kinde
Daniel_Kindeβ€’2mo ago
Can you share details @Lytemare of the callback URL you're getting?
Lytemare
Lytemareβ€’2mo ago
I'm not even getting that error anymore. Just a blank page in Safari. In Chrome, get This page isn’t workingmain.dlrove54zv9py.amplifyapp.com is currently unable to handle this request. HTTP ERROR 500. I don't understand why I have this problem. Works perfectly well localhost:3000. When I update callback url with app domain, it just will not work. Wanted to know how to delete the business? Cannot find this info in any of the docs. I wanted to create a new one and try it that way? Unfortnately Kinde is not going to work in Amplify. Get invalid callback again. Docs on Kinde site are not very helpful.
Daniel_Kinde
Daniel_Kindeβ€’2mo ago
Hi, we run Kinde on amplify internally as part of our test suite, are you able to give more more details on the error you're getting? could you give me a screenshot of the error?
Lytemare
Lytemareβ€’2mo ago
I cleared and re input environment variables in amplify and edited my build settings. Now I can get to the sign on page but when I try to sign on get the following error under url: mydomainname.com/api/auth/kinde_callback?code=w9L89j5MuU-oIBYTbU5k9jaoWMKGNuS9F9ZTI5xMfH0.A1Z0uExLWjmei1yUS_9L4jrgyauRp90T_pYuj-nwhko&scope=openid%20profile%20email%20offline&state=3ad123ca57d4c0c24b0fe9128310
No description
Daniel_Kinde
Daniel_Kindeβ€’2mo ago
Is this after the auth flow has been completed? Are you able to send me a video? You can DM me if you would rather.
Lytemare
Lytemareβ€’2mo ago
In sign up page <RegisterLink> I can input First Name, Last Name and email. I get the verification code. After I enter the verification code I get HTTP error 500 So I tried to deploy my app from vercel instead but I am having the same issue as above. Verified environmental variables. This same app tests perfectly locally
Want results from more Discord servers?
Add your server
More Posts