Issue with Unauthorized Access Redirection in Login System

Hello @Teodor , @patrick

I have prepared a project in which, of course, users can log in using their username and password. However, I have noticed an issue that has occurred.

I have set up a redirection to the login page in case of unauthorized access in the server action and router, but I have encountered a problem where the page loads even if there is an unauthorized access in the router, and then it redirects to the login page after the page has loaded completely. This means that the person who wants to access the page first sees the page and then goes to the login page.

What I want is for the user to be directed straight to the login page if there is an authorization issue, without the page loading at all. I am not sure if this is a bug or not. If I provide you with the page link and user credentials, could you check this issue for me?

Community Page
Last updated: