#useConvexAuth().isAuthenticated does not update even though it should on signIn after token expiry

4 messages · Page 1 of 1 (latest)

limpid quiver
#

, this happens on an expo app, where I redirect based on the isAuthenticated field status, this works great for first user sign-in, but if the user's token expires while using the app, they get redirected back to the sign-in screen ( due to the live nature of convex, useConvexAuth().isAuthenticated re renders to false) , and when they signIn again, useConvexAuth().isAuthenticated keeps returning false, a weird thing is if I close and open the app again, ( reset the socket connection ) isAuthenticated works automatically and redirects me without me having to sign in, so that sign-in attempt was successful, just isAuthenticated does not update for some reason.

The token is also broken as convex handlers using getAuthUserId don’t resolve it

dark frost
#

I'm not familiar with a useIsAuthenticated hook, where is that coming from

limpid quiver
#

I meant to say useConvexAuth() im so dumb

#

const { isAuthenticated } = useConvexAuth()