Skip to content

Commit

Permalink
Merge branch 'main' into types-1
Browse files Browse the repository at this point in the history
  • Loading branch information
GiteaBot authored Jul 25, 2024
2 parents d47d22c + cabcca3 commit 2c91dc7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web_src/js/features/user-auth-webauthn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ import {GET, POST} from '../modules/fetch.ts';
const {appSubUrl} = window.config;

export async function initUserAuthWebAuthn() {
if (!document.querySelector('.user.signin')) {
const elPrompt = document.querySelector('.user.signin.webauthn-prompt');
const elSignInPasskeyBtn = document.querySelector('.signin-passkey');
if (!elPrompt && !elSignInPasskeyBtn) {
return;
}

if (!detectWebAuthnSupport()) {
return;
}

const elSignInPasskeyBtn = document.querySelector('.signin-passkey');
if (elSignInPasskeyBtn) {
elSignInPasskeyBtn.addEventListener('click', loginPasskey);
}

const elPrompt = document.querySelector('.user.signin.webauthn-prompt');
if (elPrompt) {
login2FA();
}
Expand Down

0 comments on commit 2c91dc7

Please sign in to comment.