Skip to content

Comments

[FIX] Enable face id after re-login if was enabled before#3247

Closed
reinaldonetof wants to merge 13 commits intodevelopfrom
fix.face-id-re-login
Closed

[FIX] Enable face id after re-login if was enabled before#3247
reinaldonetof wants to merge 13 commits intodevelopfrom
fix.face-id-re-login

Conversation

@reinaldonetof
Copy link
Contributor

@reinaldonetof reinaldonetof commented Jul 1, 2021

Proposed changes

The current behavior of screen lock:

Go to settings, and active unlock with a passcode, you confirm the passcode and if your phone has biometry or face id you could select them to unlock the app too. When you do a re-login and activate again the screen lock, your configurations will be the default, nevertheless, the passcode continues the same as before.

This purpose introduces a fix to that bug #3102, besides maintaining the data that the user modifications to a specific server, like: in server A the user set that there is a screen lock, that could unlock with face id and the time is 1 minute, if the user adds and does a login in a server B, the screen lock will appear again only when he tries to open the server A, but if he continues with the server B and didn't activate the screen lock, the screen lock won't appear.

One important thing to report is that the password/passcode will be the same for the whole app.

Issue(s)

Closes #3102 - face id remains off after re-login

How to test or reproduce

  • Do the Login, go to Settings > Security and privacy > Screen Lock
  • Enable Unlock with Passcode
  • Enable Unlock with FaceID
  • Then logout and login again
  • Enable Unlock with Passcode and Unlock with FaceID needs to be enabled too

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Closes #3102

@reinaldonetof reinaldonetof requested a review from diegolmello July 1, 2021 14:41
Copy link
Contributor

@gerzonc gerzonc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@AlexAlexandre AlexAlexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

Copy link
Member

@diegolmello diegolmello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I'm missing a more detailed explanation of what it's the current behavior and what you're trying to do. Can you add comments on the code explaining what you're doing? (It can be as GIthub comments... no need to actually right on the code).
  • Can you write a proper test plan? Example: what happens if the user updates from version 1 to version 2? Is the app going to allow them to see messages?
  • Can we write regression tests?

serverRecord = await serversCollection.find(server);

const { storedAutoLock, storedAutoLockTime, storedBiometry } = await checkAutoLockAndTime(server);
await serversDB.action(async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't get what we're trying to do here.
Aren't we migrating to MMKV?

Copy link
Contributor Author

@reinaldonetof reinaldonetof Oct 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed to do that because when we are starting the app the getSettings is called and the serverInfoUpdate uses the data from the watermelonDB. When I proposed these changes I didn't change the getSettings, but what do you think about it?

Copy link
Member

@diegolmello diegolmello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FaceID is an iOS feature only and it's not available to all devices.
Some of them might have TouchID only, for example.
The same value is going to be used on Android devices.
We need to call it biometry as it's used on other places.

@diegolmello diegolmello deleted the fix.face-id-re-login branch January 31, 2022 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Turns off face id after re-login

4 participants