ACINQ / phoenix

Phoenix is a self-custodial Bitcoin wallet using Lightning to send/receive payments.
https://phoenix.acinq.co
Apache License 2.0
644 stars 97 forks source link

Biometrics fallback to recovery phrase #339

Closed robbiehanson closed 9 months ago

robbiehanson commented 1 year ago

After the user enables biometrics in Phoenix, they may be locked out of the app due to a hardware failure. For example, on iOS, if the fingerprint reader breaks then they may be locked out of the app.

In a general sense, this is similar to other common scenarios:

And the solution is to simply re-install Phoenix, and restore your wallet using your recovery phrase.

However, in this particular situation (biometrics failure) it makes sense to allow the user to restore access to the app if they know their recovery phrase. This allows them to skip the uninstall/reinstall step. Which may be particularly useful if they've disabled certain backup features (e.g. due to privacy concerns).

robbiehanson commented 1 year ago

Technical notes for iOS:

We are currently using LAPolicyDeviceOwnerAuthenticationWithBiometrics. In the event of a failure, it automatically displays a prompt to the user that says "Enter passcode". This is a bug. That is, LAContext has a localizedFallbackTitle which defaults to "Enter passcode". But it's purpose (when used with LAPolicy.deviceOwnerAuthenticationWithBiometrics) is to link to an app-specific fallback. There was NOT an app-specific fallback in Phoenix. So this was a bug. We need to set the localizedFallbackTitle to something like "Enter recovery phrase", and then link that to the proper UI.

robbiehanson commented 9 months ago

Fixed via PR #478