You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to add SSR to my project with getServerSideProps using the new withUserTokenSSR.
Version used: ^1.0.0-canary.18
In dev env everything works just fine.
In staging the user returned by withUserTokenSSR is null.
This code sample works on one page in local :
exportconstgetServerSideProps=withUserTokenSSR({})(async({ req, res, user })=>{console.log(user)}exportdefaultwithUser()(MyPage)
But it does not work on a staging environnement and get a null user.
If I had
whenUnauthed: AuthAction.REDIRECT_TO_LOGIN,
I obviously get an infinite loop between my login page and the other page (in staging env only).
I'm using a custom (but almost identical as the default) tokenChangedHandler.
authUser return null in staging env.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey there,
I wanted to add SSR to my project with getServerSideProps using the new withUserTokenSSR.
Version used:
^1.0.0-canary.18
In dev env everything works just fine.
In staging the user returned by
withUserTokenSSR
is null.This code sample works on one page in local :
But it does not work on a staging environnement and get a null user.
If I had
I obviously get an infinite loop between my login page and the other page (in staging env only).
I'm using a custom (but almost identical as the default)
tokenChangedHandler
.authUser return null in staging env.
Do you have any idea where I should look at?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions