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 <roeland@famdouma.nl>
This commit is contained in:
parent
c37bb7745b
commit
8e9433aee9
|
@ -71,7 +71,9 @@ class CredentialRepository implements PublicKeyCredentialSourceRepository {
|
||||||
} catch (IMapperException $e) {
|
} catch (IMapperException $e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$defaultName = false;
|
||||||
if ($name === null) {
|
if ($name === null) {
|
||||||
|
$defaultName = true;
|
||||||
$name = 'default';
|
$name = 'default';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +81,7 @@ class CredentialRepository implements PublicKeyCredentialSourceRepository {
|
||||||
|
|
||||||
if ($oldEntity) {
|
if ($oldEntity) {
|
||||||
$entity->setId($oldEntity->getId());
|
$entity->setId($oldEntity->getId());
|
||||||
if ($name === null) {
|
if ($defaultName) {
|
||||||
$entity->setName($oldEntity->getName());
|
$entity->setName($oldEntity->getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue