Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

elo's avatar
Level 3

Changing logout redirect path in Laravel Nova

Hello devs, I recently started using Laravel Nova for admin related task and really like the clean UI and general flow. However, I am experiencing an issue with logout. When I logout, I get redirected to http://127.0.0.1:8000/nova but the page is showing not authenticated error instead of the nova login page.

I obviously cannot get to the nova login page too by simply typing the url like so http://127.0.0.1:8000/nova. To do so I must type it like this http://127.0.0.1:8000/nova/login

So the application I am using Nova for is an API only project and I am using Passport for authentication. I have not made any changes to the default Nova api routes file or added any Nova routes to my application's api.php file, so I have no idea why it is throwing an Unauthenticated response.

I need help in fixing this issue. All efforts are appreciated.

0 likes
4 replies
aurawindsurfing's avatar

Hey @elo

I'm pretty sure Nova has nothing to do with your Passport check the basic .env file in your app. Did you change:

APP_URL=http://localhost

to the name of your app?

elo's avatar
Level 3

@aurawindsurfing No I did not change the name or APP_URL. These are the current values from the env file

APP_NAME=Laravel
APP_ENV=local
APP_KEY=*********************
APP_DEBUG=true
APP_URL=http://localhost

Do I need to do anything in my env file for me to be able to hit the Nove login page when I logout or do directly to the login page when I enter http://127.0.0.1:8000/nova?

aurawindsurfing's avatar

@elo

Change:

APP_URL=http://localhost

to

APP_URL=http://yourapplicationname.test

and then see how the logout will work, your nova url will be:

http://yourapplicationname.test/nova

Hope it helps!

Please or to participate in this conversation.