@convex-dev/auth isn't working with NextJs and Github provider
I had some trouble with my main project, so I started a small project with only the simplest login possible and it still won't work. When I follow the instructions in the doc I end up clicking the login button, approving on Github and then my page reloads, with no session created or anything.
My convex logs look like the attached image
6 Replies
One extra confusing part to this: I am getting a user and authAccount for my github account, and an authVerifier - but no sessions are created.
I tried this out (copied your auth.ts + page.tsx into my own app) and didn't hit issues. To try trouble shooting a little bit, can you confirm you're on the latest version of
@convex-dev/auth
+ convex
?
Can you double check that all your Convex environment variables look reasonable? (I'll add a screenshot of what's working for me)
Do you get the same issue in incognito (or if you clear your local storage on your frontend, and also clear cookies on your happy-animal-123.convex.site
domain)Here are the variables I have set
Oh I had deleted all local storage but I didn’t think about the .convex.site domain - I’ll go and make sure those are all gone and try another browser/incognito too. Thanks for the tips! The versions are all freshly installed by bun, and the variables all look good to me.
Okay, I have tried in Chrome and that works, no luck with Safari at all but that lets me crack on anyway. Safari didn't work even on "private browser"
Oh interesting that it seems to be browser specific! I was trying in Chrome. Let's see if I hit this in Safari
Ok I can reproduce this in Safari -- I'll dig into what's happening there. Thanks for the bug report!
The Safari issue should be fixed on the latest Convex Auth version (0.0.63)!
Just to confirm, that update is working for me, thanks!