useConvexAuth().isAuthenticated is true, but auth fails
To store the Auth0 user in my Convex database, I have a
user/create
mutation that inserts the user (if not already in the db) and then returns it. I use it like so:
But the mutation fails (sometimes - consistently on my desktop, but not on my phone π€ ) with this error:6 Replies
Hey @Dan Mercer , first to double check, are you on the latest 0.12.2 version of convex?
I'm on 0.12.1, lemme try upgrading
Also I tried checking
isLoading
too but no dice:0.12.1 should be ok. The error would suggest to me that the client is being authenticated but the server cannot verify the token the client is passing down. Iβd double check that convex.json has the right Auth0 keys and that itβs been deployed via
npx convex dev
.Ok weird update... clearing my localStorage (and logging in again) fixed it π€
I guess my auth0 session was messed up somehow? Thanks anyway for the help π
I feel like I have the weirdest auth problems all the time... I guess I'm just bad at using auth0 π
Auth is really tough. Weβre working on making it better but weβre really 1% done π