Closed wpsouto closed 8 months ago
Hi @wpsouto,
For this functionality you can use fallback authentication which involves adding a fallback
array inside of the credentials sent through Auth::attempt()
. These credentials get passed to the standard Laravel Eloquent authentication driver (notice the mail
and the email
array keys are different):
Auth::attempt([
'mail' => $request->email,
'password' => $request->password,
'fallback' => [
'email' => $request->email,
'password' => $request->password,
],
]);
When trying to authenticate and the user cannot be found or the LDAP is offline, how to authenticate with the user registered in the database?