Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

workaround for: problem with two factor authentication #894 #914

Open
ivanomatteo opened this issue Aug 12, 2021 · 0 comments
Open

workaround for: problem with two factor authentication #894 #914

ivanomatteo opened this issue Aug 12, 2021 · 0 comments

Comments

@ivanomatteo
Copy link

Login works, but automatic user import do not works.

/**
 * 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);
    }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant