Vue guard router failed
Hellop, I have a vue3 app consume laravel 11 api,
I want to develop a router guard to redirect unauthenticated users to the login page. When the Laravel server is not running, the code works and redirects to the login page, but when the server is running, it may cause an infinite loop of requests being sent to the server to check the authenticated user: