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

jan_zikmund's avatar

Use Nova with make:auth authorization

Hi, on our new project we want to use Nova, but I am still confused if it is a good idea to use it together with basic authentication set by php artisan make:auth. We mostly want just a few admin users who will have access to Nova to administer everything, and then have regular users who need to be logged in for some actions in the front-end of the application but without any access to Nova at all.

So I am wondering if I should do artisan make:auth first to handle standard users and then install Nova on top of that, or if Nova itself can replace all middleware provided by make:auth and having both would be duplicit / bad practice? Obviously I just want a single users table and stick to best practices, but as the roles won't be mixed, I would like to simply say that admins can access nova, regular users cannot and don't worry about it much anymore. What setup would be most appropriate? Thanks a lot

0 likes
4 replies
jlrdw's avatar

Have laravel authetication and authorization setup so the logged in user can or cannot access whatever in nova.

The core is still laravel.

jan_zikmund's avatar

Thanks jlrdw, makes sense. So if anyone was researching the same thing, here is what I found (strange I haven't found similar summary in Nova docs):

I just used standard Laravel make:auth command to create my login interface, reset pass, users database structure etc. Then I installed Nova, which fluently started using this Laravel auth. It just has its own login page on /nova/login, which looks slightly different, but no matter if I login through this form, or standard make:auth's /login , it is the same user session and everything, so no duplication happens.

As I wanted simple user roles, I made a migration to add "role" column on users table, and then in app/Providers/NovaServiceProvider modified gate() method to validate if user has role "admin". This handles overall access to Nova, which is all I need. So no need to create Policy classes etc.

Overall I am very happy with how nicely Nova blends with the existing Laravel setup, great job. Hope it helps someone, cheers

2 likes
aj-php's avatar

I'm running into a small problem over here. I have the same setup as jan_zikmund above, yet I am unable to access my Nova pages. Fresh Laravel app, then ran make:auth.

If I login via example.com/login, I am able to get to the single page we have behind the auth.

I installed Laravel Nova. Now, I can do login via example.com/login And I get the single page we have behing the auth.

Yet if I visit example.com/nova I get a 403 forbidden.

What am I missing?

Thank you!

Please or to participate in this conversation.