1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-12 10:14:10 +01:00

Unlock Safari extension with Apple Watch for MacBook users in clamshell mode

Signed-off-by: Mikaël Barbero <mikael.barbero@eclipse-foundation.org>
This commit is contained in:
Mikaël Barbero 2023-12-14 16:17:08 +01:00
parent 117e789775
commit 5ed4e3e3f4
No known key found for this signature in database
GPG Key ID: 37D1E340BB381104

View File

@ -152,7 +152,11 @@ func handleBiometricUnlock(_ message: [String: Any]?, _ context: NSExtensionCont
var error: NSError?
let laContext = LAContext()
laContext.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error)
if #available(macOSApplicationExtension 10.15, *) {
laContext.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometricsOrWatch, error: &error)
} else {
laContext.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error)
}
if let e = error, e.code != kLAErrorBiometryLockout {
response.userInfo = notSupportedResponse