Fixed compatibility error with webauthn library which prevented 2FA via webauthn

This commit is contained in:
Jan Böhmer 2024-03-04 21:20:57 +01:00
parent df53cf2540
commit 0cd631774b

View file

@ -48,6 +48,12 @@ class WebauthnKey extends BasePublicKeyCredentialSource implements TimeStampable
#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'webauthn_keys')]
protected ?User $user = null;
//Fix compatibility with webauthn-library >= 4.8 which would fail with an "failed to access uvInitialized before initialization" error otherwise
//TODO: Make these fields persistent, so that users can view these status infos in the UI
public ?bool $uvInitialized = null;
public ?bool $backupEligible = null;
public ?bool $backupStatus = null;
public function getName(): string
{
return $this->name;