You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't figure something out. I am using your package in a Restful API configuration. I would like to implement two authentications using Laravel Fortify if possible to save me too much work. This API will have to authenticate users in an SPA as well as a mobile application.
The first one would be an authentication for my customers table in landlord and another authentication in each of my tenants users table.
2. In the sanctum.php configuration, I added the landlords and tenants guards:
'guard' => ['landlords', 'tenants'],
My first problem is that Fortify accepts only one guard in its configuration, it seems that it is not possible to have two?
Please note that I have disabled fortify routes (Fortify::ignoreRoutes();) and copied the login/logout route into my own route file that implements the middleware API. Do I still need the web middleware? (The idea later is to support OTP, reset password, etc.)
My next idea would have been to add a second login route for the mobile application to deliver a token.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I can't figure something out. I am using your package in a Restful API configuration. I would like to implement two authentications using Laravel Fortify if possible to save me too much work. This API will have to authenticate users in an SPA as well as a mobile application.
The first one would be an authentication for my
customers
table in landlord and another authentication in each of my tenantsusers
table.Here is my code:
1. My auth.php configuration, is it correct?
2. In the sanctum.php configuration, I added the landlords and tenants guards:
My first problem is that Fortify accepts only one guard in its configuration, it seems that it is not possible to have two?
Please note that I have disabled fortify routes (
Fortify::ignoreRoutes();
) and copied the login/logout route into my own route file that implements the middleware API. Do I still need the web middleware? (The idea later is to support OTP, reset password, etc.)My next idea would have been to add a second login route for the mobile application to deliver a token.
Beta Was this translation helpful? Give feedback.
All reactions