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
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
maybe this is what this means?
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