using convex auth & nextjs router. using router.back() does not refresh auth in time.
i have a convex & nextjs app.
convex api that runs on the main page:
when i go to a subpage and click the back button to go back to main (via router.back() or router.push()), it gives me this "not signed in error".
from console logging, it seems like getAuthUserId is returning null and not updating. it seems to be saving the "is Authenticated" state
do you have recommendations?

1 Reply
It looks like "Not signed in" is an error message being thrown by your own application code, Convex doesn't do any auth checks on your behalf. If the query is being called while unauthenticated, you either need to add a client side check for authentication before calling it, or a server side check if the page you're going back to is being server rendered.