Add PublicKeyCredential guard for passkey registration
Deploy Dashboard / deploy (push) Successful in 35s
Deploy Dashboard / deploy (push) Successful in 35s
This commit is contained in:
@@ -40,6 +40,9 @@
|
||||
passkeyLoading = true;
|
||||
passkeyMsg = ""; passkeyErr = "";
|
||||
try {
|
||||
if (!window.PublicKeyCredential) {
|
||||
throw new Error("Passkeys are not supported in this browser or context");
|
||||
}
|
||||
const opts = await post("/auth/passkey/register/options");
|
||||
opts.challenge = base64urlToBuffer(opts.challenge);
|
||||
opts.user.id = base64urlToBuffer(opts.user.id);
|
||||
|
||||
Reference in New Issue
Block a user