-
Notifications
You must be signed in to change notification settings - Fork 985
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
Biometrics button on login screen #18106
Changes from 6 commits
5a74b91
ed5b192
5f1a7e5
14754f3
9331a74
e294870
5a13b7c
50dcd11
e7ecf7d
ee8e738
782c233
a95b478
8b80d27
7fa247b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(ns status-im2.common.biometric.constants) | ||
|
||
(def ^:const auth-error-user-canceled "USER_CANCELED") | ||
(def ^:const auth-error-user-fallback "USER_USER_FALLBACK") | ||
(def ^:const auth-error-not-available "NOT_AVAILABLE") | ||
(def ^:const auth-error-not-enrolled "NOT_ENROLLED") |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,7 @@ | |
{:container-style style/auth-button | ||
:on-press on-press-biometrics | ||
:icon-only? true | ||
:background :blur | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should probably be passed as a prop and defaulted to false. wdyt? I think in some flows this could be incorrect 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The text input has There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here is the designs for syncing auth - https://www.figma.com/file/V6nlpAWIf2e1XU8RJ9yQPe/Syncing-for-Mobile?type=design&node-id=1112-146720&mode=design&t=ioE4htigtApMxrtn-4 |
||
:type :outline} | ||
:i/face-id])] | ||
(when error? | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,6 +124,8 @@ | |
:on-card-press (fn [] | ||
(rf/dispatch | ||
[:profile/profile-selected key-uid]) | ||
(rf/dispatch | ||
[:profile.login/login-with-biometric-if-available key-uid]) | ||
(when-not keycard-pairing (set-hide-profiles)))}])) | ||
|
||
(defn- f-profiles-section | ||
|
@@ -206,8 +208,14 @@ | |
:profile-picture profile-picture | ||
:card-style style/login-profile-card}] | ||
[standard-authentication/password-input | ||
{:shell? true | ||
:default-password password}]] | ||
{:shell? true | ||
:on-press-biometrics (fn [] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this correct? Have you handled the case where biometrics fails -> password input shows, then you press biometric authenticate again and let it fail -> password input shows then you press biometric authenticate again ... (to infinity :) ) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure I understand the flow 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I might be wrong let me test out your branch 😀 |
||
(rf/dispatch [:biometric/authenticate | ||
{:on-success #(rf/dispatch | ||
[:profile.login/biometric-success]) | ||
:on-fail #(rf/dispatch | ||
[:profile.login/biometric-auth-fail %])}])) | ||
:default-password password}]] | ||
[quo/button | ||
{:size 40 | ||
:type :primary | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have status-im2.constants for all constants