Closed Ryunosukee closed 4 years ago
Hi @dcorrea-estrav,
I think you may have intended to post this on the LdapRecord-Laravel repository, but no worries 👍
You cannot use two-factor authentication with LdapRecord-Laravel. You must disable it inside of your config/fortify.php
file in the features
key.
Hi @dcorrea-estrav,
I think you may have intended to post this on the LdapRecord-Laravel repository, but no worries 👍
You cannot use two-factor authentication with LdapRecord-Laravel. You must disable it inside of your
config/fortify.php
file in thefeatures
key.
Thanks for your help
No problem @dcorrea-estrav!
I am however going to see if this is something I can implement and get working with LdapRecord-Laravel. Stay tuned for updates on the LdapRecord-Laravel repository! 👍
automatic user import do not work anyway.
/**
* workaround for two factor auth
*/
class LaravelLdapUserProvider extends DatabaseUserProvider
{
public function validateCredentials(Authenticatable $model, array $credentials)
{
if (!$this->retrieveByCredentials([
config('fortify.username') => $model->name,
'password' => $credentials['password'],
])) {
return false;
}
return parent::validateCredentials($model, $credentials);
}
}
Description:
Normal authentication works quite well, but when I try to configure the two-factor authentication that laravel 8 brings, I have a problem trying to validate the token.
Thanks for your help