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