AlphaOmegaA
Convex Community11mo ago
4 replies
AlphaOmega

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

, 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
Was this page helpful?