clients
clients copied to clipboard
[PS-1395] Unlock Safari extension with Apple Watch for MacBook users in clamshell mode
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
deviceOwnerAuthenticationWithBiometricsOrWatchfor 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

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

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)
Thank you for your contribution! We've added this to our internal Community PR board for review. ID: PS-1395
Is there any progress on the review?
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?
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.
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 & team, any update on this?
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?
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 😓