How can I restore an auth session on NextJS' "getServerSideProps"? Is there a way to dump the session to a cookie and recover it from there?
Kylar
09/08/2021, 9:39 PM
I'm trying the approach of setting the accessToken into a cookie and then recovering it from the context (which works).
At this point I have the access token in the server side implementation.
Then I'm trying to use
setAuth()
to override whatever the access token is on the server and then use
refreshSession()
.
That last part returns null data even when the access token is correctly set