DEV Community

Discussion on: Auto login with Laravel on development

Collapse
 
rvxlab profile image
RVxLab • Edited

Why not use a Middleware for this and conditionally load it in a ServiceProvider?

On top, I really wouldn't return a 403 here. In most circles you'd give away that there's something there. I'd return a 404 instead.

Collapse
 
arielmejiadev profile image
Ariel Mejia

its another approach I just imagine a login button to make it but it sound cleaner on authServiceProvider, definitely another interesting approach