mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 23:25:53 -05:00
Fixed FIDO WebAuthn with FireFox.
This commit is contained in:
parent
82a4c472e0
commit
fd0e349854
@ -2881,18 +2881,15 @@
|
|||||||
var publicKey = message.request;
|
var publicKey = message.request;
|
||||||
message.request.challenge = Uint8Array.from(atob(message.request.challenge), function (c) { return c.charCodeAt(0) })
|
message.request.challenge = Uint8Array.from(atob(message.request.challenge), function (c) { return c.charCodeAt(0) })
|
||||||
message.request.user.id = Uint8Array.from(atob(message.request.user.id), function (c) { return c.charCodeAt(0) })
|
message.request.user.id = Uint8Array.from(atob(message.request.user.id), function (c) { return c.charCodeAt(0) })
|
||||||
setTimeout(function() {
|
navigator.credentials.create({ publicKey: publicKey }).then(function(newCredentialInfo) {
|
||||||
navigator.credentials.create({ publicKey: publicKey })
|
// Public key credential
|
||||||
.then(function(newCredentialInfo) {
|
var r = { rawId: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.rawId))), response: { attestationObject: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.response.attestationObject))), clientDataJSON: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.response.clientDataJSON))) }, type: newCredentialInfo.type };
|
||||||
// Public key credential
|
meshserver.send({ action: 'webauthn-endregister', response: r });
|
||||||
var r = { rawId: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.rawId))), response: { attestationObject: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.response.attestationObject))), clientDataJSON: btoa(String.fromCharCode.apply(null, new Uint8Array(newCredentialInfo.response.clientDataJSON))) }, type: newCredentialInfo.type };
|
setDialogMode(0);
|
||||||
meshserver.send({ action: 'webauthn-endregister', response: r });
|
}, function(error) {
|
||||||
setDialogMode(0);
|
// Error
|
||||||
}, function(error) {
|
setDialogMode(2, "Add Security Key", 1, null, "ERROR: " + error);
|
||||||
// Error
|
});
|
||||||
setDialogMode(2, "Add Security Key", 1, null, "ERROR: " + error);
|
|
||||||
});
|
|
||||||
}, 100);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'verifyPhone': {
|
case 'verifyPhone': {
|
||||||
|
Loading…
Reference in New Issue
Block a user