From 22cc9f47c2c4e6e43e438080c7bac8f105aa8144 Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Mon, 13 Jan 2025 09:59:24 +0100 Subject: [PATCH 1/3] Add support for fido2 2fa on mac --- .../src/platform/services/electron-platform-utils.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/platform/services/electron-platform-utils.service.ts b/apps/desktop/src/platform/services/electron-platform-utils.service.ts index b61d2a0c5e9..bb4ffa50e81 100644 --- a/apps/desktop/src/platform/services/electron-platform-utils.service.ts +++ b/apps/desktop/src/platform/services/electron-platform-utils.service.ts @@ -80,7 +80,9 @@ export class ElectronPlatformUtilsService implements PlatformUtilsService { // Temporarily restricted to only Windows until https://github.com/electron/electron/pull/28349 // has been merged and an updated electron build is available. supportsWebAuthn(win: Window): boolean { - return this.getDevice() === DeviceType.WindowsDesktop; + return ( + this.getDevice() === DeviceType.WindowsDesktop || this.getDevice() === DeviceType.MacOsDesktop + ); } supportsDuo(): boolean { From 814cee0ad5014c045eb51923447fe0c6ba17c4a9 Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Mon, 13 Jan 2025 12:18:15 +0100 Subject: [PATCH 2/3] Update comment --- .../src/platform/services/electron-platform-utils.service.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/desktop/src/platform/services/electron-platform-utils.service.ts b/apps/desktop/src/platform/services/electron-platform-utils.service.ts index bb4ffa50e81..e86d44f71f2 100644 --- a/apps/desktop/src/platform/services/electron-platform-utils.service.ts +++ b/apps/desktop/src/platform/services/electron-platform-utils.service.ts @@ -77,8 +77,7 @@ export class ElectronPlatformUtilsService implements PlatformUtilsService { return (await this.getApplicationVersion()).split(/[+|-]/)[0].trim(); } - // Temporarily restricted to only Windows until https://github.com/electron/electron/pull/28349 - // has been merged and an updated electron build is available. + // Restricted to Windows and Mac. Mac is missing support for pin entry, and Linux is missing support entirely and has to be implemented in another way. supportsWebAuthn(win: Window): boolean { return ( this.getDevice() === DeviceType.WindowsDesktop || this.getDevice() === DeviceType.MacOsDesktop From b243c47a582c8ae504dac5900bc1ac6a75c66bd7 Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Wed, 15 Jan 2025 15:01:01 +0100 Subject: [PATCH 3/3] Update 2fa setup message --- .../two-factor/two-factor-setup-webauthn.component.html | 5 +---- apps/web/src/locales/en/messages.json | 7 ++----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/apps/web/src/app/auth/settings/two-factor/two-factor-setup-webauthn.component.html b/apps/web/src/app/auth/settings/two-factor/two-factor-setup-webauthn.component.html index 0a2eb346b1b..c9e2e111481 100644 --- a/apps/web/src/app/auth/settings/two-factor/two-factor-setup-webauthn.component.html +++ b/apps/web/src/app/auth/settings/two-factor/two-factor-setup-webauthn.component.html @@ -14,10 +14,7 @@ {{ "twoStepLoginProviderEnabled" | i18n }} -

{{ "twoFactorWebAuthnWarning" | i18n }}

-
    -
  • {{ "twoFactorWebAuthnSupportWeb" | i18n }}
  • -
+

{{ "twoFactorWebAuthnWarning1" | i18n }}

FIDO2 WebAuthn logo
    diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 001918ef495..9d41e0dcf44 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -2308,11 +2308,8 @@ "twoFactorU2fProblemReadingTryAgain": { "message": "There was a problem reading the security key. Try again." }, - "twoFactorWebAuthnWarning": { - "message": "Due to platform limitations, WebAuthn cannot be used on all Bitwarden applications. You should set up another two-step login provider so that you can access your account when WebAuthn cannot be used. Supported platforms:" - }, - "twoFactorWebAuthnSupportWeb": { - "message": "Web vault and browser extensions on a desktop/laptop with a WebAuthn supported browser (Chrome, Opera, Vivaldi, or Firefox with FIDO U2F turned on)." + "twoFactorWebAuthnWarning1": { + "message": "Due to platform limitations, WebAuthn cannot be used on all Bitwarden applications. You should set up another two-step login provider so that you can access your account when WebAuthn cannot be used." }, "twoFactorRecoveryYourCode": { "message": "Your Bitwarden two-step login recovery code"