Skip to content

Commit

Permalink
FIX Argument rpId must be of type string
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabina Talipova committed Sep 21, 2023
1 parent 7a95f20 commit 877e593
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/RegisterHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ protected function getCredentialCreationOptions(
*/
protected function getAuthenticatorSelectionCriteria(): AuthenticatorSelectionCriteria
{
return AuthenticatorSelectionCriteria::create((string) $this->config()->get('authenticator_attachment'));
return AuthenticatorSelectionCriteria::create()
->setAuthenticatorAttachment((string) $this->config()->get('authenticator_attachment'));
}
}
3 changes: 2 additions & 1 deletion src/VerifyHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ protected function getCredentialRequestOptions(
return $source->getPublicKeyCredentialDescriptor();
}, $validCredentials ?? []);

$options = new PublicKeyCredentialRequestOptions(random_bytes(32), 40000);
$options = new PublicKeyCredentialRequestOptions((string) random_bytes(32));
$options->setTimeout(4000);

$options->allowCredentials(...$descriptors);
$options->setUserVerification(PublicKeyCredentialRequestOptions::USER_VERIFICATION_REQUIREMENT_PREFERRED);
Expand Down

0 comments on commit 877e593

Please sign in to comment.