diff --git a/src/RegisterHandler.php b/src/RegisterHandler.php index 97c566d..d9868c4 100644 --- a/src/RegisterHandler.php +++ b/src/RegisterHandler.php @@ -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')); } } diff --git a/src/VerifyHandler.php b/src/VerifyHandler.php index 651131c..cab09fe 100644 --- a/src/VerifyHandler.php +++ b/src/VerifyHandler.php @@ -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);