Skip to content

Commit

Permalink
FIX Pass AuthenticatorSelectionCriteria as argument to PublicKeyCrede…
Browse files Browse the repository at this point in the history
…ntialCreationOptions constructor
  • Loading branch information
Sabina Talipova committed Sep 21, 2023
1 parent 251bef6 commit 7a95f20
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/RegisterHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ protected function getCredentialCreationOptions(
$this->getUserEntity($store->getMember()),
random_bytes(32),
[new PublicKeyCredentialParameters('public-key', Algorithms::COSE_ALGORITHM_ES256)],
40000
$this->getAuthenticatorSelectionCriteria()
);
$credentialOptions->setAuthenticatorSelection($this->getAuthenticatorSelectionCriteria());
$credentialOptions->setAttestation(PublicKeyCredentialCreationOptions::ATTESTATION_CONVEYANCE_PREFERENCE_NONE);
Expand All @@ -282,7 +282,6 @@ protected function getCredentialCreationOptions(
*/
protected function getAuthenticatorSelectionCriteria(): AuthenticatorSelectionCriteria
{
return AuthenticatorSelectionCriteria::create()
->setAuthenticatorAttachment((string) $this->config()->get('authenticator_attachment'));
return AuthenticatorSelectionCriteria::create((string) $this->config()->get('authenticator_attachment'));
}
}

0 comments on commit 7a95f20

Please sign in to comment.