Skip to content

Commit c19d639

Browse files
authored
Merge pull request #20940 from nextcloud/backport/20858/stable19
[stable19] Remember the webauthn name of devices
2 parents c37bb77 + 8e9433a commit c19d639

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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)