I'm using @convex-dev/auth (v0.0.90) with convex (v1.31.0) and React 19. After completing OAuth (Google) or password sign-in:
What I observe:
- useAuthToken() returns the JWT token (it's stored in localStorage as _convexAuthJWT...)
- useConvexAuth() returns { isAuthenticated: false, isLoading: false }
- A manual hard refresh (Cmd+Shift+R) fixes it - then isAuthenticated: true
My setup:
// main.tsx
const convex = new ConvexReactClient(import.meta.env.VITE_CONVEX_URL)
<ConvexAuthProvider client={convex}>
<App />
</ConvexAuthProvider>
What I've tried:
- Clearing localStorage/sessionStorage/cookies
- window.location.reload() doesn't fix it, only hard refresh does
- Backend logs show auth:signIn and auth:store succeed
- SITE_URL env var is set correctly in Convex dashboard
Question: Is there a known issue where the WebSocket doesn't pick up the token from localStorage after sign-in? Is there a way to force re-authentication without a hard refresh?