Web Dev Cody
Web Dev Cody5mo ago

How to know if authenticated in next client component?

I'm not sure if I misconfigured next.js and convex auth, but it seems like isAuthenticated never sets true for me. const { isAuthenticated } = useConvexAuth(); console.log("isAuthenticated", isAuthenticated); // always false I setup the auth with google, and I'm able to successfully go through the oauth flow and redirect back to my app.
4 Replies
Web Dev Cody
Web Dev CodyOP5mo ago
I guess I could use useAuthToken to verify if I'm logged in or is the expected way to only ever use isAuthenticatedNextjs and pass it down to client components
Web Dev Cody
Web Dev CodyOP5mo ago
No description
Web Dev Cody
Web Dev CodyOP5mo ago
maybe this is what this means?
Michal Srb
Michal Srb5mo ago
This means we don't support Pages Router This is the same issue probably as in https://discord.com/channels/1019350475847499849/1273347536941486130/1273347536941486130 ? I do expect that something is wrong with your Convex Auth Next.js setup

Did you find this page helpful?