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
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
I'm getting exactly the same error
but does it return user?
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
Actually it's working here lemme
This is the 4th time I'll read the convex docs today '