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
dan2y 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
jamiedubs2y 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
'tonyyprints'
'tonyyprints'OP2y ago
yea the re-direct is having issues now lol thank you
'tonyyprints'
'tonyyprints'OP2y ago
No description
'tonyyprints'
'tonyyprints'OP2y ago
now whenever I try to sign in I just get this
dan
dan2y ago
check the console in vsc it'll have more info sorry on vercel*
jamiedubs
jamiedubs2y 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
dan2y ago
that error on the ui is pretty generic
'tonyyprints'
'tonyyprints'OP2y 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
dan2y ago
You can't use sqlite on vercel.
'tonyyprints'
'tonyyprints'OP2y ago
oh lmfao forgot to change that
dan
dan2y ago
The data wouldnt be saved correctly due to how serverless works
'tonyyprints'
'tonyyprints'OP2y ago
ahh good to know I was trying planetscale, do you recommend anything else
dan
dan2y ago
if you dont want to manage it yourself planetscale is fine
'tonyyprints'
'tonyyprints'OP2y ago
alright awesome thank you

Did you find this page helpful?