Skip to content

Commit

Permalink
Prevent showing webauthn error for every time visiting `/user/setting…
Browse files Browse the repository at this point in the history
…s/security` (#18385) (#18386)

Backport #18385
  • Loading branch information
wxiaoguang committed Jan 25, 2022
1 parent 42991dc commit b68e605
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions web_src/js/features/user-auth-webauthn.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,12 @@ export function initUserAuthWebAuthnRegister() {
return;
}

if (!detectWebAuthnSupport()) {
return;
}

$('#webauthn-error').modal({allowMultiple: false});
$('#register-webauthn').on('click', (e) => {
e.preventDefault();
if (!detectWebAuthnSupport()) {
return;
}
webAuthnRegisterRequest();
});
}
Expand Down

0 comments on commit b68e605

Please sign in to comment.