Skip to content

Commit a47afc4

Browse files
authored
fix: no password rehashing in case of webauthn login (#485)
1 parent 3e5eaa2 commit a47afc4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Auth/EloquentWebAuthnProvider.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,17 @@ public function validateCredentials(User $user, array $credentials): bool
8484

8585
return false;
8686
}
87+
88+
/**
89+
* Rehash the user's password if required and supported.
90+
*/
91+
public function rehashPasswordIfRequired(User $user, array $credentials, bool $force = false): void
92+
{
93+
if ($this->isSignedChallenge($credentials)) {
94+
// We don't need to rehash the password for WebAuthn credentials.
95+
return;
96+
}
97+
98+
parent::rehashPasswordIfRequired($user, $credentials, $force);
99+
}
87100
}

0 commit comments

Comments
 (0)