Danny ID
Convex Community12mo ago
32 replies
Danny I

github oauth stuck in redirect loop

Hello kind folks,

I am using github oauth and resend, like in the demo boilerplate project when initializing a convex app with NextJS, convex auth, github oauth, and hosting on Vercel.
In development, login works.
In production, login actually works, the database receives the correct user data from github, but the front end crashes.
Opening the network tab reveals a slew of 302 redirects, followed by 308 redirects.
I am using NextJS, hosting on Vercel, with a domain.

I've checked:
- The middleware js file
- The environment variables
- The github oauth app id and key
- For the homepage url I used my production domain, though it seems to work in dev either way.
- For the github, the callback url for convex, followed the set up documentation a few times step by step
- Maybe my convex server + client providers are wrong?

What did I miss?
Any ideas?
Was this page helpful?