webauthnServerRepository = $webauthnServerRepository; } public function handle(User $user): PublicKeyCredentialCreationOptions { $excluded = $user->securityKeys->map(function (SecurityKey $key) { return $key->getPublicKeyCredentialDescriptor(); })->values()->toArray(); $server = $this->webauthnServerRepository->getServer($user); return $server->generatePublicKeyCredentialCreationOptions( $user->toPublicKeyCredentialEntity(), PublicKeyCredentialCreationOptions::ATTESTATION_CONVEYANCE_PREFERENCE_NONE, $excluded ); } }