Skip to content

Commit d25af9c

Browse files
committed
Don't signal accepted credentials on localhost
This may prevent developers from using Passkeys they have created for other applications.
1 parent 34feb49 commit d25af9c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

client/src/sync_signals.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ declare var PublicKeyCredential: PublicKeyCredentialConstructor;
6969
);
7070
}
7171

72+
// If we are on localhost, skip signaling all accepted credentials as this may
73+
// remove credentials from other applications also using localhost
74+
if (window.location.hostname === "localhost") {
75+
console.log(
76+
"[WebAuthn] Skipping PublicKeyCredential.signalAllAcceptedCredentials since we are on localhost, this may affect other applications.",
77+
);
78+
return;
79+
}
80+
7281
// Signal all accepted credentials
7382
if (
7483
typeof PublicKeyCredential === "undefined" ||

0 commit comments

Comments
 (0)