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

Implement biometrics (#15) #20

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

Berna-L
Copy link

@Berna-L Berna-L commented Mar 20, 2023

This implementation adds an option to the settings page to require biometrics (on devices that offer such a feature).

When enabled (and enabling it requires authentication, BTW):

  1. Upon opening the app, the code will only autosend the code to XL after authenticating the user.
  2. Suspending the app or closing the app will prompt a reauthentication upon resuming/opening it again, and the OTP code in the main page will appear as "???" while authentication is pending.

This also includes the commits from #21 .

@Berna-L Berna-L marked this pull request as draft March 20, 2023 23:53
@Berna-L Berna-L marked this pull request as ready for review March 21, 2023 00:12
@Berna-L Berna-L marked this pull request as draft March 25, 2023 20:14
@Berna-L Berna-L marked this pull request as ready for review April 3, 2023 19:12
@Berna-L
Copy link
Author

Berna-L commented Apr 3, 2023

Finished up the implementation and got my environment to work on real devices, so I tested on both a Galaxy A10s (with fingerprint sensor) and an iPhone 14 Pro, but further testing is welcome (and desirable).

@Berna-L Berna-L changed the title Draft: #15: Implement biometrics #15: Implement biometrics Apr 3, 2023
@Berna-L Berna-L changed the title #15: Implement biometrics Implement biometrics (#15) Apr 3, 2023
@Berna-L
Copy link
Author

Berna-L commented Apr 7, 2023

Generated a local IPA and installed on my device through AltStore. The only issues (both caused by recent Xcode 14.3, so they may be fixed in a future Flutter build) are:

  1. Some of the dependencies have set their minimum iOS as 8.0, which gives some issues when compiling. Using this solution worked.
  2. When building the IPA, the build spits out some error about DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled. This can be solved with this.

Now, it'll basically shoot the OTP at the same time to all registered IPs. Since any IP that actually has XL waiting for the code will reply quickly, it'll return true if any client received the code.

If no client is running, any fail response is good.
- Update SDK version
- Change MainActivity superclass to FlutterFragmentActivity (see https://pub.dev/documentation/local_auth/latest/ -> Activity Changes)
- Change AndroidManifest.xml to add android:exported="true" (required for Android 12+)
- Do not let user use the application until they authenticate
- Make the biometrics option centered.
+ Rename Authentication class to Biometrics.
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

1 participant