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