fix: improve terminal robustness with exponential backoff and better keepalive #34
@@ -36,13 +36,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function registerPasskey() {
|
async function registerPasskey() {
|
||||||
|
alert("registerPasskey called!");
|
||||||
passkeyLoading = true;
|
passkeyLoading = true;
|
||||||
passkeyMsg = ""; passkeyErr = "";
|
passkeyMsg = ""; passkeyErr = "";
|
||||||
try {
|
try {
|
||||||
|
alert("Checking PublicKeyCredential support...");
|
||||||
if (!window.PublicKeyCredential) {
|
if (!window.PublicKeyCredential) {
|
||||||
|
alert("PublicKeyCredential NOT supported!");
|
||||||
throw new Error("Passkeys are not supported in this browser or context");
|
throw new Error("Passkeys are not supported in this browser or context");
|
||||||
}
|
}
|
||||||
|
alert("Fetching registration options...");
|
||||||
const opts = await post("/auth/passkey/register/options");
|
const opts = await post("/auth/passkey/register/options");
|
||||||
|
alert("Got options: " + JSON.stringify(opts).substring(0, 100));
|
||||||
opts.challenge = base64urlToBuffer(opts.challenge);
|
opts.challenge = base64urlToBuffer(opts.challenge);
|
||||||
opts.user.id = base64urlToBuffer(opts.user.id);
|
opts.user.id = base64urlToBuffer(opts.user.id);
|
||||||
if (opts.excludeCredentials) {
|
if (opts.excludeCredentials) {
|
||||||
|
|||||||
Reference in New Issue
Block a user