mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-03 20:36:07 +01:00 
			
		
		
		
	Prevent showing webauthn error for every time visiting /user/settings/security (#18385)
				
					
				
			This commit is contained in:
		@@ -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();
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user