Discord oauth with Convex Auth and invalid redirect uri.
Hi!
I've been trying to setup discord oauth with convex and it's giving me so much issues!
Here's my auth.ts
Here's the sign in button:
And here's my middleware (with next-intl):
NEXT_PUBLIC_CONVEX_URL=http://127.0.0.1:3210 so this is default.
I've been trying to set up callback url within discord dev portal to variations of
http://localhost:3210/auth/callback/discord
, I tried localhost, tried 127.0.0.1, tried 3210 and 3000 ports and it always gives me wrong oauth2 redirect_uri error.
I am out of ideas and I was hoping I can get some help here.2 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
The callback url is based on your Convex Site URL (ends in .site), for self hosted that defaults to port 3211. Port 3210 is your Convex URL (aka your Convex Cloud URL, ends in .cloud). https://labs.convex.dev/auth/config/oauth#callback-url
OAuth - Convex Auth
Authentication library for your Convex backend