Skip to content

Commit

Permalink
Force platform authenticator
Browse files Browse the repository at this point in the history
  • Loading branch information
broody committed Sep 3, 2024
1 parent 77dccaa commit ef83a9a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/keychain/src/hooks/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,10 @@ type Credentials = RawAttestation & {
export const createCredentials = async (
name: string,
beginRegistration: CredentialCreationOptions,
hasPlatformAuthenticator: boolean,
_hasPlatformAuthenticator: boolean,
) => {
if (!hasPlatformAuthenticator || navigator.userAgent.indexOf("Win") != -1)
beginRegistration.publicKey.authenticatorSelection.authenticatorAttachment =
"cross-platform";
else
beginRegistration.publicKey.authenticatorSelection.authenticatorAttachment =
undefined;
beginRegistration.publicKey.authenticatorSelection.authenticatorAttachment =
"platform"

beginRegistration.publicKey.user.id = Buffer.from(name);
beginRegistration.publicKey.challenge = base64url.toBuffer(
Expand Down

0 comments on commit ef83a9a

Please sign in to comment.