Web Dev CodyW
Convex Community17mo ago
4 replies
Web Dev Cody

Simulate Convex Auth Invalid

I've noticed that sometimes when my users leave my site open for a while, their convex auth session becomes invalid. This usually means when a user clicks on a button, the mutation throws an auth error.

Is there some standard way to handle this type of issue? It would be nice if there was a way to wrap useMutation or useQuery in custom logic to redirect the user if an auth error gets returned from my api.
Was this page helpful?