Ferdinand
Ferdinand5mo ago

Convex Auth with Next js always return null both in server and client?

Hello there! I am using the latest next js and convex. I scrupulously followed the convex auth doc for next js with google. When I login everything works well even in the middleware but I am unable to retrieve the user info through the middleware as well as the client using either fetchQuery or useQuery.
5 Replies
Devben
Devben5mo ago
I face the same issue also if you change ConvexAuthNextjsProvider to convexAuthProvider It will work But you will see this error Uncaught (in promise) Error: [Request ID: 5dfe7ffe2f531b80] Server Error Uncaught Error: Uncaught Error: Invalid argument id for db.get: Unable to decode ID: Invalid ID length 5 @Ferdinand You may try it, it may not give you error
Ferdinand
FerdinandOP5mo ago
I'm getting exactly the same error
Devben
Devben5mo ago
but does it return user?
Ferdinand
FerdinandOP5mo ago
Yes I'm getting the user but with the error above I have another issue When I sign out the cookie is not cleared in the browser
Devben
Devben5mo ago
Actually it's working here lemme This is the 4th time I'll read the convex docs today '

Did you find this page helpful?