Make LinkNewDeviceScreen fall back to the App Lock PIN code when there's no passcode. (#5794)

* Fall back to the AppLock PIN code when there's no passcode.

* Add extra tests on the LinkNewDeviceFlowCoordinator.

* Misc tweaks for clarification.

* Regenerate snapshots.
This commit is contained in:
Doug
2026-07-01 10:13:18 +01:00
committed by GitHub
parent 7097ceb910
commit 123661537a
38 changed files with 296 additions and 21 deletions
@@ -16,7 +16,12 @@ class AppLockService: AppLockServiceProtocol {
private let context: LAContext
private let timer: AppLockTimer
/// Only use Biometrics to unlock the app, we want to fall back to the App Lock PIN, not the device's passcode.
private let unlockPolicy: LAPolicy = .deviceOwnerAuthenticationWithBiometrics
/// Use biometrics *or* the device's passcode to verify the device owner. Available regardless of whether biometrics are enrolled.
///
/// **Note:** Verifying the device owner is used to gate sensitive actions, it isn't related to unlocking the app.
/// Maybe we should rename this service in the future.
private let deviceOwnerPolicy: LAPolicy = .deviceOwnerAuthentication
var isMandatory: Bool {