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

Make authenticateWithBiometrics public so as App can present it if needed #15

Merged
merged 1 commit into from
Mar 12, 2016

Conversation

ziogaschr
Copy link
Collaborator

Some apps need to be able to request TouchID immediately which is served by a nice option in the library.
Furthermore, the nice thing with this library is that it can be easily extended for supporting more features.
One feature that we have added to our app is passcode expiry after a time period. For example user wants to leave app unlocked for 3 minutes.

In this case our flow is as follows:

  1. When app moves to background
    • Passcode is presented
    • A splash view is being added
  2. When app comes to foreground
    • We check if Passcode is expired
      • remove splash view
      • if not expired:
        • dismisss passcode view
        • *

So for * the issue is that by setting shouldRequestTouchIDImmediately to true it will display the TouchID alert and there is no easy way to dismiss it. Apple has introduced LAContext().invalidate() at iOS9, although the animation has to happen and the user sees a flickering/annoying animation.

So instead of this, it works better to leave shouldRequestTouchIDImmediately to false and call authenticateWithBiometrics in our apps' code if needed.

p.s: passcodeConfiguration.shouldRequestTouchIDImmediately has been moved out of authenticateWithBiometrics as it doesn't feel to be in the right context and also caused the above scenario to not work.

@younanjo
Copy link

younanjo commented Mar 8, 2016

I was going to make the similar pull request and i noticed this by @ziogaschr . When the app is in background and user still has a valid "Session" come back to the app result in a cancelable touch-id prompt which is odd. please merge.

@ziogaschr
Copy link
Collaborator Author

@velikanov I plan to merge the PRs tomorrow if you don't have any considerations to add :)

ziogaschr added a commit that referenced this pull request Mar 12, 2016
Make `authenticateWithBiometrics` public so as App can present it if needed
@ziogaschr ziogaschr merged commit 70d1532 into velikanov:master Mar 12, 2016
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