Non-LDAP login stops working #437
-
Hello, so I have followed the instructions from https://ldaprecord.com/docs/laravel/v2/auth#synchronized-database-authentication to enable LDAP login for my LDAP users, but still allow non-LDAP users to log-in (which I understood from that description should be possible? However, this seems not to be the case. What am I doing wrong? I authenticate the user according to the documentation: $credentials = [
'mail' => '[email protected]',
'password' => 'password',
];
if (Auth::attempt($credentials)) {
$user = Auth::user();
return redirect('/dashboard')->with([
'message' => "Welcome back, {$user->name}"
]);
} and while it works for LDAP users, it doesn't work for non-LDAP users. Tried changing Or am I supposed to create another provider and then swap between those providers based on how I want to authenticate? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @LukasFreyCZ, I believe you’re looking for fallback authentication: https://ldaprecord.com/docs/laravel/v2/auth/database/laravel-ui/#fallback-authentication Can you give that a shot? |
Beta Was this translation helpful? Give feedback.
Hi @LukasFreyCZ,
I believe you’re looking for fallback authentication:
https://ldaprecord.com/docs/laravel/v2/auth/database/laravel-ui/#fallback-authentication
Can you give that a shot?