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

Auth mobile #783

Merged
merged 14 commits into from
Nov 12, 2018
Merged

Auth mobile #783

merged 14 commits into from
Nov 12, 2018

Conversation

tanx
Copy link
Contributor

@tanx tanx commented Nov 9, 2018

Closes #778, closes #607

N.B. before we use this in production we need to fix #777

@tanx tanx requested a review from valentinewallace November 9, 2018 16:35
@tanx
Copy link
Contributor Author

tanx commented Nov 9, 2018

@valentinewallace I created an issue to fix the breaking build. It's out of scope for this PR though: #784

Copy link
Contributor

@valentinewallace valentinewallace left a comment

Choose a reason for hiding this comment

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

Excellente. I'm pretty pleasantly surprised by how fast mobile is coming along and the amount of code reuse we're getting.

Very nice separation of the auto-mobile actions from the wallet. I added a minor suggestion about an error message but I'm good to merge this!

* or a fingerprint reader on Android.
* @return {Promise<undefined>}
*/
async tryFingerprint() {
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a plan to add copy so the user knows that they can use their fingerprint/faceID?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the device supports it the native OS UI will already display copy...

img_5921

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, not on Android. I just tried it and it worked

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok cool. I try to write the code so that it at least runs on Android, but I think we can ignore Android specific issues and focus on iOS for now.

mobile/main.js Outdated
@@ -1,5 +1,5 @@
/**
* @fileOverview The main module that wires up all depdencies for mobile.
* @fileOverview the main module that wires up all depedencies for mobile.
Copy link
Contributor

Choose a reason for hiding this comment

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

lol, nit: s/depedencies/dependencies

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -21,6 +27,7 @@ const WaitView = () => (
color={color.lightPurple}
style={styles.spinner}
/>
<Text style={styles.copy}>Loading network...</Text>
Copy link
Contributor

Choose a reason for hiding this comment

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

Very good 👌

async checkNewPin() {
const { newPin, pinVerify } = this._store.auth;
if (newPin.length !== PIN_LENGTH || newPin !== pinVerify) {
this._alert('Incorrect PIN', () => this.initSetPin());
Copy link
Contributor

Choose a reason for hiding this comment

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

I liked in the previous commit in this PR where it told the user when the PINs did not match. Maybe we could switch to that error message -- is it possible for them to enter a pin of less than the correct length, since it won't let them go to the next screen otherwise?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I liked in the previous commit in this PR where it told the user when the PINs did not match. Maybe we could switch to that error message

Ok. I changed it back.

is it possible for them to enter a pin of less than the correct length, since it won't let them go to the next screen otherwise?

Nope. The check only happens when all six bubbles are filled.

return;
}
const msg = 'Unlock your Wallet';
const { success } = await this._Fingerprint.authenticateAsync(msg);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can confirm that fingerprint auth works on Android!!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice. Did you get that iOS device yet?

@valentinewallace valentinewallace mentioned this pull request Nov 10, 2018
@valentinewallace
Copy link
Contributor

@valentinewallace I created an issue to fix the breaking build. It's out of scope for this PR though: #784

SGTM!

@tanx tanx merged commit b9b14d7 into master Nov 12, 2018
@tanx tanx deleted the auth-mobile branch November 12, 2018 10:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants