Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ios) Custom PIN as an option for “app access” #560

Merged
merged 13 commits into from
May 21, 2024

Conversation

robbiehanson
Copy link
Contributor

We've had many requests for a "custom PIN" option. That is, the ability to set a PIN/passcode that's specific to Phoenix, and possibly different than the system PIN/passcode.

This PR allows us to explore how that feature would operate in practice.

On the surface it's quite simple:

A new PIN option is added to the "app access" section. The user can choose any of the following options:

  • Face ID only
  • Face ID + system PIN fallback
  • Face ID + custom PIN fallback
  • Custom PIN only

The custom PIN length is 6 digits. (This matches the iOS default PIN length.)

And the PIN will be presented to the user from within the Lock screen:

  

The usual suspects are there:

  • if the user enters the wrong PIN multiple times, there's a "slowdown" timer that kicks in (anti-brute-force)
  • Invalid PIN attempts are stored in the keychain, so even if they relaunch the app, the slowdown timer is still active
  • when the user creates their PIN, they have to enter it twice to confirm

However, there are some iOS specific "things to consider":

The "system PIN fallback" was added in PR #478. Recall that when we prompt for "system authentication" we basically only have 3 options on iOS:

  • Face ID (biometrics) only
  • Face ID (biometrics) + system PIN fallback
  • Face ID (biometrics) + custom (app specific) fallback

In other words, prompting for the system PIN is not an option. It's only available as a fallback option (after biometrics fails).

So the "system PIN fallback" option was primarily motivated by user expectations. But was also partly motivated by user reports of broken Face ID (due to broken hardware). It was thought that, if Face ID breaks, then users would still be able to access Phoenix via the system PIN. However, recent reports have cast doubt on that assumption.

When I go to Settings -> Face ID & code, I get the message "A problem was detected with the TrueDepth camera. Face ID has been deactivated"

In other words, in certain situations when Face ID breaks, the system automatically disables it on a system level. Making it no longer accessible from within apps. Meaning even with the "system PIN fallback" users would be locked out of Phoenix. To re-access their wallet, they would need to reinstall & restore their wallet. The custom PIN option does present an alternative here.

@robbiehanson robbiehanson marked this pull request as ready for review May 16, 2024 14:35
@robbiehanson robbiehanson requested a review from dpad85 May 16, 2024 14:35
@robbiehanson
Copy link
Contributor Author

Is issue #441 we said:

In all cases, the seed should be backed up before enabling any of these [app access] options. Or at least show a visible warning.

We could add that here, or make it a separate PR.

@dpad85
Copy link
Member

dpad85 commented May 17, 2024

We could add that here, or make it a separate PR

I think it's fine in this PR (it should not be a large change?)

@robbiehanson
Copy link
Contributor Author

All options are now disabled until the user performs a backup:

@robbiehanson robbiehanson requested a review from dpad85 May 20, 2024 20:42
@robbiehanson robbiehanson merged commit 6662ca8 into master May 21, 2024
@robbiehanson robbiehanson deleted the ios-access-control-pin branch May 21, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants