Error: Authenticator has already been registered

This commit is contained in:
Reynir Björnsson 2021-10-13 12:59:33 +02:00
parent 00c1b4cf93
commit c825a21b19

View file

@ -102,7 +102,12 @@ let register_view origin user =
});
});
}).catch(function (err) {
alert("exception: " + err);
// XXX: only if the exception came from navigator.credentials.create()
if (err.name === "InvalidStateError") {
alert("authenticator already registered");
} else {
alert("exception: " + err);
}
window.location = "/";
});
});