Skip to content

Commit 12fe83c

Browse files
Merge pull request #20858 from nextcloud/fix/20289/remember_webauth_names
Remember the webauthn name of devices
2 parents 6374c32 + f4ac9ff commit 12fe83c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/private/Authentication/WebAuthn/CredentialRepository.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,17 @@ public function saveAndReturnCredentialSource(PublicKeyCredentialSource $publicK
7171
} catch (IMapperException $e) {
7272
}
7373

74+
$defaultName = false;
7475
if ($name === null) {
76+
$defaultName = true;
7577
$name = 'default';
7678
}
7779

7880
$entity = PublicKeyCredentialEntity::fromPublicKeyCrendentialSource($name, $publicKeyCredentialSource);
7981

8082
if ($oldEntity) {
8183
$entity->setId($oldEntity->getId());
82-
if ($name === null) {
84+
if ($defaultName) {
8385
$entity->setName($oldEntity->getName());
8486
}
8587
}

0 commit comments

Comments
 (0)