-
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 in new settings #18258
Biometrics in new settings #18258
Conversation
da32288
to
b12bb6a
Compare
Jenkins BuildsClick to see older builds (33)
|
@@ -28,6 +29,12 @@ | |||
:FaceID (i18n/label :t/biometric-faceid) | |||
(i18n/label :t/biometric-touchid))) | |||
|
|||
(defn get-icon-by-type | |||
[biometric-type] | |||
(case biometric-type |
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 generally prefer condp =
as case
does not pick up compile time errors, in this case you can probably just use an (if
, though I take the idea is that we will have more eventually
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.
yes, in case we would like to differentiate touch id with fingerprint or the face biometrics on android in the future
(rf/reg-event-fx | ||
:standard-auth/reset-login-password | ||
(fn [{:keys [db]}] | ||
{:db (update-in db [:profile/login] dissoc :password :error)})) |
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.
looks like you can use update
(update db :profile/login dissoc...)
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.
Well done. LGTM :)
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.
Nice work! @clauxx 🚀
:action :selector | ||
:action-props {:disabled? (not supported?) | ||
:on-change press-handler | ||
:checked? (and supported? enabled?)} |
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.
biometric-on?
let var can be re-used here.
{:style {:padding-horizontal 20 | ||
:padding-bottom 8 | ||
:padding-top 12}} |
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.
Styles can be moved to style.cljs
.
Thanks @smohamedjavid! Addressed your comments |
71% of end-end tests have passed
Failed tests (8)Click to expandClass TestActivityMultipleDevicePR:
Class TestCommunityOneDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestCommunityMultipleDeviceMerged:
Expected to fail tests (6)Click to expandClass TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityOneDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMerged:
Passed tests (34)Click to expandClass TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestDeepLinksOneDevice:
Class TestCommunityOneDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestActivityMultipleDevicePRTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestCommunityMultipleDeviceMerged:
|
@clauxx - I checked the PR build. There was a crash on opening the app for login for a profile with the biometric login, and it got disabled later.
This comes from status-mobile/src/status_im/contexts/profile/login/events.cljs Lines 180 to 198 in e59e34d
|
(rf/dispatch [:hide-bottom-sheet]) | ||
(rf/dispatch [:standard-auth/reset-login-password]) | ||
(rf/dispatch [:biometric/enable | ||
(security/mask-data password)]))}))) |
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.
@clauxx if you take a look at on-auth-success
the password is already hashed etc 👍
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.
status-mobile/src/status_im/common/standard_authentication/standard_auth/authorize.cljs
Line 21 in 5fa9c0c
(let [sha3-pwd (if biometric? |
It depends if the password is from biometrics or password etc
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.
I'm just masking it here, so no hashing involved. Maybe it should be masked inside authorize before it's passed to on-auth-success
, otherwise the whole purpose is kinda lost.
Great job ! @clauxx |
ISSUE 3 Touch ID toggle in the Profile Settings has two different names Preconditions: Android device with set fingerprint Steps:
|
:on-auth-success (fn [entered-password] | ||
(prn entered-password) | ||
(rf/dispatch [:wallet/derive-address-and-add-account | ||
{:sha3-pwd entered-password | ||
{:sha3-pwd (security/safe-unmask-data entered-password) |
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.
@J-Son89 I added the change to mask the pwd inside authorize's on-auth-success
to avoid the password hash getting leaked e.g. as it would in line 122 (prn entered-password)
, as it's still sensitive info.
@Francesca-G please have a look. FYI we agreed to handle the issues mentioned by @mariia-skrypnyk in a follow-up. |
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.
* feat: added biometrics setting to new-settings * fix: fix renaming issues from status-im2 * ref: addressed @cammellos' review comments * fix: open password settings in a modal * ref: addressed review comments * fix: disabling biometric clears auth-method from keychain * chore: quo/overlay seqs the childrend so need to add keys * fix: don't pass the password unmasked between events to avoid leaks
fixes #18204
Summary
Added the
Password
setting screen and theEnable Biometric
functionality. In order to enable biometrics from the settings, the user has to enter their password first.Platforms
Areas that maybe impacted
Functional
Steps to test
status: ready