laravel / fortify

Backend controllers and scaffolding for Laravel authentication.
https://laravel.com/docs/fortify
MIT License
1.61k stars 294 forks source link

Allow use of custom guards specified in config/auth.php to build multi auth system. #126

Closed amit-dalal closed 3 years ago

amit-dalal commented 3 years ago

In lot of projects we do have multiple user tables based on requirement, so, it is not feasible to have single user table in this scenario. Result is multiple tables in database storing credentials for different roles.

In this case till now we used to specify custom guard in config/auth.php in Laravel for each credential table and use them to build multi-auth system. However, Jetstream is using single guard specified in Fortify.php.

Request: Please provide option to choose guard specified in config/auth.php to create a multiauth system instead of using single guard from fortify.php. At present, we are forced to use only one guard specified in fortify.php to use in application. Please help !!

redidizzy commented 3 years ago

Any news regarding that ?

driesvints commented 3 years ago

@redidizzy if there hasn't been an update here then no there isn't any news. Anyone's free to send in a PR.

amit-dalal commented 3 years ago

@driesvints Please take up this feature on priority as this is one of the main requirement which we feel missing in Laravel.

taylorotwell commented 3 years ago

This is a feature request, not a bug.

taylorotwell commented 3 years ago

To build your own custom, multi-auth system: https://laravel.com/docs/8.x/authentication#authenticating-users

koudera1 commented 3 years ago

https://max-eckel.dev/posts/multi-guard-authentication-with-laravel-fortify