serverRepository = $serverRepository; } /** * @param \Pterodactyl\Models\User $user * @return \Webauthn\PublicKeyCredentialRequestOptions */ public function handle(User $user): PublicKeyCredentialRequestOptions { $credentials = $user->securityKeys->map(function (SecurityKey $key) { return $key->getPublicKeyCredentialDescriptor(); })->values()->toArray(); $response = $this->serverRepository->getServer($user) ->generatePublicKeyCredentialRequestOptions( PublicKeyCredentialRequestOptions::USER_VERIFICATION_REQUIREMENT_PREFERRED, $credentials ); return $response->setTimeout(300); } }