Skip to content
This repository was archived by the owner on Dec 14, 2021. It is now read-only.

Authenticate via fingerprint or PIN to autofill when the app is locked#413

Merged
jhugman merged 26 commits intomasterfrom
216-authenticate-to-autofill
Feb 13, 2019
Merged

Authenticate via fingerprint or PIN to autofill when the app is locked#413
jhugman merged 26 commits intomasterfrom
216-authenticate-to-autofill

Conversation

@ioana-farcas
Copy link
Copy Markdown
Contributor

@ioana-farcas ioana-farcas commented Jan 31, 2019

Fixes #216

Testing and Review Notes

In the current state, this works for authenticating using PIN (when app does not enter in a weird state, when there are no entries in the list). For authentication using fingerprint, the only reason it is not working (as far as I can see), is the fact that DataStore.State == null. Don't know exactly why, I will try tomorrow to take a look at this.
@jhugman I think you will take over, the code needs a little refactoring..

Screenshots or Videos

(Optional: to clearly demonstrate the feature or fix to help with testing and reviews)

To Do

  • add “WIP” to the PR title if pushing up but not complete nor ready for review
  • double check the original issue to confirm it is fully satisfied
  • add testing notes and screenshots in PR description to help guide reviewers
  • add unit tests
    • optional: consider adding instrumentation (integration/UI) tests
  • consider running this branch in a debug simulator and check for memory leak notifications or any warnings
  • request the "UX" team perform a design review (if/when applicable)
  • make sure CI builds are passing (e.g.: fix lint and other errors)
  • check on the accessibility of any added UI

@ioana-farcas ioana-farcas requested a review from a team as a code owner January 31, 2019 18:58
@ghost ghost assigned ioana-farcas Jan 31, 2019
@ghost ghost added the in progress label Jan 31, 2019
@ioana-farcas ioana-farcas changed the title Authenticate via fingerprint or PIN to autofill when the app is locked [WIP] Authenticate via fingerprint or PIN to autofill when the app is locked Jan 31, 2019
@jhugman jhugman assigned jhugman and unassigned ioana-farcas Feb 1, 2019
@jhugman jhugman force-pushed the 216-authenticate-to-autofill branch from 37f5eeb to 055fd3c Compare February 7, 2019 01:00
Copy link
Copy Markdown
Contributor

@sashei sashei left a comment

Choose a reason for hiding this comment

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

drive-by!

I gather you've found a way around the AutofillService requiring both the password list and the authentication callback in the same fill response, but I assume you're looking for feedback on the changes to how the AccountStore / AutolockStore interact with the DataStore -- I like this approach much better than what we had before, but would like to see it live in the DataStore rather than having the Account- and Autolock- stores dispatch their own actions. Happy to do some pairing / discussion on this if you're keen!

}

override fun onConnected() {
// stupidly unlock every time :D
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:D

Comment thread app/src/main/java/mozilla/lockbox/autofill/FillResponseBuilder.kt
Comment thread app/src/main/java/mozilla/lockbox/autofill/FillResponseBuilder.kt
Comment thread app/src/main/java/mozilla/lockbox/autofill/FillResponseBuilder.kt Outdated
Comment thread app/src/main/java/mozilla/lockbox/LockboxApplication.kt
Comment thread app/src/main/java/mozilla/lockbox/store/AccountStore.kt
Comment thread app/src/main/java/mozilla/lockbox/store/AutoLockStore.kt
Comment thread app/src/main/java/mozilla/lockbox/presenter/AuthPresenter.kt
Comment thread app/src/main/java/mozilla/lockbox/presenter/AuthPresenter.kt
@jhugman jhugman force-pushed the 216-authenticate-to-autofill branch 2 times, most recently from ab516cc to f3265da Compare February 11, 2019 14:03
@jhugman jhugman force-pushed the 216-authenticate-to-autofill branch from f3265da to 72a58d8 Compare February 12, 2019 16:23
@jhugman jhugman changed the title [WIP] Authenticate via fingerprint or PIN to autofill when the app is locked Authenticate via fingerprint or PIN to autofill when the app is locked Feb 12, 2019
Copy link
Copy Markdown
Contributor

@linuxwolf linuxwolf left a comment

Choose a reason for hiding this comment

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

Engineering wise, this looks good to me.

  • The PSL changes make sense
  • Stores reading state from other stores is sensible

A nit on the localizable strings, to better align with designs.

Comment thread app/src/main/res/values/strings.xml Outdated
<!-- This is the error message when autofill is triggered but no domain is detected. This is unlikely. -->
<string name="autofill_error_no_hostname">Unexpected hostname format</string>
<!-- This is the prompt when autofill is triggered, Lockbox is unlocked, and no passwords are detected. -->
<string name="autofill_search_cta">Tap to search</string>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UX designs call for this to be "Search Lockbox"

Comment thread app/src/main/res/values/strings.xml Outdated
<string name="convenience_description">Unlock the app with ease using your fingerprint</string>

<!-- This is the prompt when autofill is triggered, and Lockbox is locked. -->
<string name="autofill_authenticate_cta">Tap to unlock</string>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I suspect @mozilla-lockbox/ux would prefer "Unlock Lockbox"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

UNLOCK YOUR FIRELOCK FOXBOX

@jhugman jhugman requested a review from a team February 13, 2019 15:44
@jhugman jhugman dismissed linuxwolf’s stale review February 13, 2019 15:45

Strings changed as per request.

Copy link
Copy Markdown
Contributor

@linuxwolf linuxwolf left a comment

Choose a reason for hiding this comment

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

r+

📦

@changecourse changecourse removed the request for review from a team February 13, 2019 16:23
@jhugman jhugman merged commit 4801d91 into master Feb 13, 2019
@ghost ghost removed the in progress label Feb 13, 2019
@devinreams devinreams deleted the 216-authenticate-to-autofill branch February 13, 2019 17:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Authenticate via fingerprint or PIN to autofill when the app is locked

4 participants