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
The problem is when I go to /plans route I should expect the session to be populated on this SSR page from the middleware? And I should expect the JWT callback to be called inside this middleware. but instead; IT IS NOT.
The jwt callback is not called in the middleware before accessing the page so therefore no token expiration check been checked ? So I cannot see how using the middleware is better than unstable_getserversession ?
I just want to be able to populate the session server-side (therefore token expiration check on server) for all my SSR pages; why is that hard to do?
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If I have a JWT callback with refresh token rotation set up & middleware implemented as simple as this:
The problem is when I go to
/plans
route I should expect the session to be populated on this SSR page from the middleware? And I should expect theJWT
callback to be called inside this middleware. but instead; IT IS NOT.The jwt callback is not called in the middleware before accessing the page so therefore no token expiration check been checked ? So I cannot see how using the middleware is better than unstable_getserversession ?
I just want to be able to populate the session server-side (therefore token expiration check on server) for all my SSR pages; why is that hard to do?
Beta Was this translation helpful? Give feedback.
All reactions