Replies: 1 comment 1 reply
-
Solved by fetching the session using GetServerSideProps and passing the session to the component.
But what I don't understand why I can not use useSession at the client side?
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
Not sure where to post this but here is my setup :
So I am using nextjs + hasura + prisma + apollo ...etc
The problem is that I am logged in, I receive the correct token. However bearer token sent through apollo client is undefined. but when I print the session it has the token. I am no sure but it seems the session is empty. (maybe caching)
How to reproduce ☕️
How to reproduce:
"next": "^11.1.0",
"next-auth": "^3.28.0",
"@apollo/client": "^3.4.8",
You can reproduce the issue by using the same files
apolloClient.tsx
cache.tsx
apolloClient.tsx
_app.tsx
articles.tsx
Contributing 🙌🏽
Yes, I am willing to help answer this question in a PR
Beta Was this translation helpful? Give feedback.
All reactions