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 have noted the example from next-auth-example delays (on purpose and with animations) a certain time the header that shows the state from the session, In particular who is logged in and the button that toggles from Sign-in/Sign-out. If you refresh the page you can clearly see a flicker until the session is loaded by useSession.
How can I prevent this flicker from happening using getSession and SSR?
Is there a way that useSession will fall back to the session got by getSession in the server (if there is one) so to render my page in consequence?
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.
-
I have noted the example from
next-auth-example
delays (on purpose and with animations) a certain time the header that shows the state from the session, In particular who is logged in and the button that toggles from Sign-in/Sign-out. If you refresh the page you can clearly see a flicker until the session is loaded by useSession.How can I prevent this flicker from happening using getSession and SSR?
Is there a way that useSession will fall back to the session got by getSession in the server (if there is one) so to render my page in consequence?
Beta Was this translation helpful? Give feedback.
All reactions