We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5266311 commit 01c8f09Copy full SHA for 01c8f09
web_src/js/features/user-auth-webauthn.ts
@@ -11,13 +11,10 @@ export async function initUserAuthWebAuthn() {
11
return;
12
}
13
14
- if (window.location.protocol === 'http:') {
15
- // webauthn is only supported on secure contexts
16
- const isLocalhost = ['localhost', '127.0.0.1'].includes(window.location.hostname);
17
- if (!isLocalhost) {
18
- hideElem(elSignInPasskeyBtn);
19
- return;
20
- }
+ // webauthn is only supported on secure contexts
+ if (!window.isSecureContext) {
+ hideElem(elSignInPasskeyBtn);
+ return;
21
22
23
if (!detectWebAuthnSupport()) {
0 commit comments