-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Split SRP input by word #14016
Split SRP input by word #14016
Conversation
787d63a
to
069506c
Compare
Builds ready [d6fdf01]Page Load Metrics (1408 ± 59 ms)
highlights:storybook
|
This new version of the SrpInput component uses a separate field for each word of the SRP. Only one field can be revealed at a time, making it less likely that it gets accidentally revealed to somebody.
The "info" style of `ActionableMessage` is the default, so no type is required.
The method `toBeInTheDocument()` is now used over `not.toBeNull()` to improve the readability of tests. Likewise, the convenience method `.clear` is now used to clear fields rather than manually entering the key combination to clear a field.
d6fdf01
to
d9eb3a5
Compare
Could this possibly be annoying for some users who want to be able to visually confirm the whole phrase? Or atleast in larger chunks than 1 at a time? cc @holantonela |
Builds ready [d9eb3a5]Page Load Metrics (1374 ± 65 ms)
highlights:storybook
|
Potentially, yes. But this was the tradeoff for making it safer to input. Unsure how we could make the process of checking the entire SRP easier. Right now the process would be "tab + tab + space" to navigate to the next word and reveal it. |
This is interesting.
We could do that by rendering the SRP as an image. |
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.
um okay i love this. Great work
I checked all steps on chrome and brave (linux) and it worked like a charm. |
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.
LGTM!
Explanation
Split the secret recovery phrase input field into one field per word. Each word uses a
type="password"
field. There is a "show/hide toggle" next to each word allowing you to reveal it, but only one word can be revealed at a time.This is a new design aimed at making our SRP input component more secure. This design makes it impossible to accidentally reveal your entire SRP to anybody nearby. It also acts as additional protection against the complete SRP being stored in a browser autocomplete database (though to be clear, we could find no evidence this was ever occurring).
More information
Figma design: https://www.figma.com/file/8z4Csc3wlOIkUz2OP1eTZW/Secure-UX-Improvements?node-id=1241%3A12046
There have been some changes from the original design (e.g. the addition of the tip about pasting). Also that design was for the "Onboarding V2" flow, so it was not followed exactly. For now this PR targets the old onboarding flow. I will add this new component to the new onboarding flow in the next PR after this.
Screenshots/Screencaps
Before
After
srp-input.mp4
Manual testing steps
The two screens that have changed are the "Import" page of onboarding, and the "Restore wallet" page accessible from the lock screen. The component and how it behaves should be identical in both places.
Suggestions on which behaviors to test: