Replies: 1 comment
-
It doesn't make sense to get a session in getStaticProps. There is no user in that context. The page is, well supposed to be static. If you need to do authentication in there, you'll need to use a different OAuth flow. (possibly client credentials. |
Beta Was this translation helpful? Give feedback.
0 replies
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 💬
How do you get the session to Apollo client when using
getStaticPaths
orgetStaticProps
. OngetServerSideProps
you can pass the context when creating a new apollo client but thats not available here.How to reproduce ☕️
Here is an example when doing a query with
GetServerSideProps
.Some page:
When you do this without context there will never be a token.
Beta Was this translation helpful? Give feedback.
All reactions