noob saibotN
Convex Community16mo ago
2 replies
noob saibot

convex auth.getUserIdentity() is inconsistent

In my nextjs app, I have upgraded convex-dev/auth to the latest version 0.0.71. I went through the documentation and correctly setup authentication including properly setting up the middleware. (also I use email provider with resend).

Now in my app, after login, I navigate to route /partners. This route accesses the session user (in the backend) by calling contex.auth.getUserIdentity(). This first call works fine as it returns the logged in user object.

But when I navigate to the subroute /partners/[id] and makes the same call, this time it returns an empty. If I go back to the previous screen and refresh the page, I'm able to get the user object just fine.

Any idea what this behaviour?...
Was this page helpful?