clients icon indicating copy to clipboard operation
clients copied to clipboard

[PS-1395] Unlock Safari extension with Apple Watch for MacBook users in clamshell mode

Open dessmith opened this issue 3 years ago • 4 comments

Type of change

- [X] Bug fix
- [ ] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Allows unlocking of Safari extension with Apple Watch for MacBook users when in clamshell mode. Users who have a paired Apple Watch expect to unlock biometric prompts with their Apple Watch. Closes #2470

Code changes

  • apps/browser/src/safari/safari/SafariWebExtensionHandler.swift: Adds biometric unlock with Apple Watch deviceOwnerAuthenticationWithBiometricsOrWatch for users on OS versions that support it. We add a macOS version check and run the code on macOS 10.15 and above as the Xcode project supports 10.14.

Screenshots

Currently the user is prompted with the following with their MacBook in clamshell mode and a paired Apple Watch

Screenshot 2022-08-30 at 12 35 13

With PR applied the user is shown the unlock with Apple Watch prompt when in clamshell mode.

Screenshot 2022-08-30 at 13 38 22

Before you submit

- [X] I have checked for **linting** errors (`npm run lint`) (required)
- [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required)
- [ ] This change requires a **documentation update** (notify the documentation team)
- [ ] This change has particular **deployment requirements** (notify the DevOps team)

dessmith avatar Aug 30 '22 13:08 dessmith

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 30 '22 13:08 CLAassistant

Thank you for your contribution! We've added this to our internal Community PR board for review. ID: PS-1395

bitwarden-bot avatar Aug 30 '22 13:08 bitwarden-bot

Is there any progress on the review?

BigDaddyOrgasmic avatar Nov 22 '22 14:11 BigDaddyOrgasmic

Are we able to make progress on this PR?

CodeScene is failing due to an increase of cyclomatic complexity. Can a maintainer take a look at this and advise on how we should proceed?

dessmith avatar Dec 15 '22 14:12 dessmith

Are we able to make progress on this PR?

CodeScene is failing due to an increase of cyclomatic complexity. Can a maintainer take a look at this and advise on how we should proceed?

Given that this method is already has a CC of 17 before this patch while the threshold is at 9, I hope this is not what prevent maintainers from reviewing (and merging) this change.

I actually just submitted a similar patch to Electron.

mbarbero avatar Jan 18 '23 14:01 mbarbero

Hi, thank you so much for the contribution. This is an upcoming priority and we're considering adding a setting to allow (or not) auto unlocking with Apple Watch so the user can have more control. So, basically if the setting is ON it allows auto unlocking with Apple Watch and if it's OFF it goes for Biometrics only.

fedemkr avatar Jan 18 '23 17:01 fedemkr

@fedemkr & team, any update on this?

dessmith avatar Jul 10 '23 14:07 dessmith

Hey guys, is there any progress on this? I'm using my MacBook exclusively in clamshell mode and this is really annoying... Given that there seems to be a solution already in this PR, why doesn't that get fixed?

vordenken avatar Sep 01 '23 17:09 vordenken

Hi, thank you so much for the contribution. This is an upcoming priority and we're considering adding a setting to allow (or not) auto unlocking with Apple Watch so the user can have more control. So, basically if the setting is ON it allows auto unlocking with Apple Watch and if it's OFF it goes for Biometrics only.

@fedemkr, @djsmith85 Has this been implemented via another PR? It's coming up to two years of this PR being open 😓

dessmith avatar May 10 '24 13:05 dessmith