discord callback url

I deployed my project to verscel but my discord redirect url for nextauth isn't working. The verscel domain is :https://forex-news-discord-bot.vercel.app/ so I made the redirect url https://localhost:3000/forex-news-discord-bot.vercel.app/
No description
15 Replies
dan
dan15mo ago
For the prod redirect url it would be https://forex-news-discord-bot.vercel.app/api/auth/callback/discord if you want it to work locally, then you'd replace the redirect url with http://localhost:3000/api/auth/callback/discord
jamiedubs
jamiedubs15mo ago
fwiw i've never been able to get Vercel preview envs + Discord auth to behave, since the Discord API does not support wildcard redirect domains. only specific hardcoded domains
'antonyyprints'
'antonyyprints'15mo ago
yea the re-direct is having issues now lol thank you
'antonyyprints'
'antonyyprints'15mo ago
No description
'antonyyprints'
'antonyyprints'15mo ago
now whenever I try to sign in I just get this
dan
dan15mo ago
check the console in vsc it'll have more info sorry on vercel*
jamiedubs
jamiedubs15mo ago
Hm yes that is an error I haven't seen before. maybe you discord app is set to only allow certain users? I vaguely recall some test-mode/allowlist settings like that
dan
dan15mo ago
that error on the ui is pretty generic
'antonyyprints'
'antonyyprints'15mo ago
ohh didn't know I can do that lol
risma:error
Invalid `prisma.account.findUnique()` invocation:


Error querying the database: unable to open database file: /var/task/node_modules/.prisma/client/./db.sqlite
[next-auth][error][adapter_error_getUserByAccount]
https://next-auth.js.org/errors#adapter_error_getuserbyaccount
Invalid `prisma.account.findUnique()` invocation:
risma:error
Invalid `prisma.account.findUnique()` invocation:


Error querying the database: unable to open database file: /var/task/node_modules/.prisma/client/./db.sqlite
[next-auth][error][adapter_error_getUserByAccount]
https://next-auth.js.org/errors#adapter_error_getuserbyaccount
Invalid `prisma.account.findUnique()` invocation:
do I need to prisma db push on verscel or something?
dan
dan15mo ago
You can't use sqlite on vercel.
'antonyyprints'
'antonyyprints'15mo ago
oh lmfao forgot to change that
dan
dan15mo ago
The data wouldnt be saved correctly due to how serverless works
'antonyyprints'
'antonyyprints'15mo ago
ahh good to know I was trying planetscale, do you recommend anything else
dan
dan15mo ago
if you dont want to manage it yourself planetscale is fine
'antonyyprints'
'antonyyprints'15mo ago
alright awesome thank you
Want results from more Discord servers?
Add your server