-
Hello, I tried to use validateRequest() in a client component and got error saying next/headers is only available on server components, so how should we check authenticated user in client components? Anyone has any solutions? Appreciate your help. |
Beta Was this translation helpful? Give feedback.
Answered by
iamtouha
Apr 19, 2024
Replies: 1 comment 1 reply
-
hi @ringge , you can call |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ringge
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi @ringge , you can call
validateRequest
in server component only. and then you can receive the user object as prop in the client component.