Closed doamatto closed 1 year ago
Due to the method that SWR (next-auth) uses to check if the user is authenticated, this may not be fixable. Only way to fix this issue is if I moved to server-side rendering, or to show a blank screen until the user is checked.
or to show a blank screen until the user is checked.
You should be able to show a loading screen interim, rather than a blank screen.
Describe the bug When you go to an unauthorised page (while logged out, for instance), you will see that page for a second or so, before being redirected. It would be ideal to prevent that page from loading in the first place, as the user is not authenticated.
To Reproduce Steps to reproduce the behavior:
Expected behavior It should go straight to the login page, rather than flash other content first
Desktop (please complete the following information):
Additional context Untested on mobile, as of writing. Will test when I get a chance.