mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-24 14:32:58 +03:00
Fixed WebAuth key addition
This commit is contained in:
parent
ab9ea4e58a
commit
1204fb93c2
@ -2213,7 +2213,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||||||
parent.f2l.attestationResult(clientAttestationResponse, attestationExpectations).then(function (regResult) {
|
parent.f2l.attestationResult(clientAttestationResponse, attestationExpectations).then(function (regResult) {
|
||||||
// Since we are registering a WebAuthn/FIDO2 key, remove all U2F keys (Type 1).
|
// Since we are registering a WebAuthn/FIDO2 key, remove all U2F keys (Type 1).
|
||||||
var otphkeys2 = [];
|
var otphkeys2 = [];
|
||||||
for (var i = 0; i < user.otphkeys.length; i++) { if (user.otphkeys[i].type != 1) { otphkeys2.push(user.otphkeys[i]); } }
|
if (user.otphkeys && Array.isArray(user.otphkeys)) { for (var i = 0; i < user.otphkeys.length; i++) { if (user.otphkeys[i].type != 1) { otphkeys2.push(user.otphkeys[i]); } } }
|
||||||
user.otphkeys = otphkeys2;
|
user.otphkeys = otphkeys2;
|
||||||
|
|
||||||
// Add the new WebAuthn/FIDO2 keys
|
// Add the new WebAuthn/FIDO2 keys
|
||||||
|
Loading…
Reference in New Issue
Block a user