krille-chan / fluffychat

The cutest instant messenger in the [matrix]
https://fluffychat.im/
GNU Affero General Public License v3.0
899 stars 151 forks source link

Allow unlocking PIN with Face ID / Touch ID or equivalent #819

Open PgBiel opened 5 months ago

PgBiel commented 5 months ago

Feature Description

Hello, One feature I'm missing from Element is the ability to unlock the app PIN on iOS using Face ID (or Touch ID depending on the iOS device used, or equivalent features on Android/other platforms). That is, when PIN lock is enabled, before the app prompts you for the PIN, it tries to use face recognition / biometrics first, and only proceeds to ask for the PIN if that authentication method fails. The usage of Face ID / Touch ID / etc. should, of course, be optional (that is, it should remain possible to prompt for the PIN directly through a setting).

Rationale

While it's a fairly small feature, it makes it much faster and more convenient to unlock the app, so it would be nice to have.

Mockup

Here's a video with how Element X does it on iOS. It first tries to recognize the user's face with Face ID (or equivalent feature(s) on Android); if that fails, it prompts for the PIN.

https://github.com/krille-chan/fluffychat/assets/9021226/0ccc5ff2-7fcf-4079-9bfd-ac4b7764a6ba

Additional Context

It seems that the following Flutter plugin could be used to implement this feature (on iOS, Android and Windows), if that helps: https://pub.dev/packages/local_auth

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 120 days with no activity.