From ef83a9aafd0ae6fa3a29cdffdb733d2cd4e1006e Mon Sep 17 00:00:00 2001 From: broody Date: Mon, 2 Sep 2024 20:50:15 -1000 Subject: [PATCH] Force platform authenticator --- packages/keychain/src/hooks/account.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/keychain/src/hooks/account.ts b/packages/keychain/src/hooks/account.ts index 910ed20af..f72761c03 100644 --- a/packages/keychain/src/hooks/account.ts +++ b/packages/keychain/src/hooks/account.ts @@ -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(