Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remember the webauthn name of devices
Fixes #20289
we should not reset to default once we have logged in with the device.

Signed-off-by: Roeland Jago Douma <[email protected]>
  • Loading branch information
rullzer committed May 7, 2020
commit f4ac9ffa2c5c50eba6298d3ae699b4aa49f8cf82
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,17 @@ public function saveAndReturnCredentialSource(PublicKeyCredentialSource $publicK
} catch (IMapperException $e) {
}

$defaultName = false;
if ($name === null) {
$defaultName = true;
$name = 'default';
}

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

if ($oldEntity) {
$entity->setId($oldEntity->getId());
if ($name === null) {
if ($defaultName) {
$entity->setName($oldEntity->getName());
}
}
Expand Down