Refactor account personal key reset to use verify flow steps#6453
Refactor account personal key reset to use verify flow steps#6453
Conversation
**Why**: So that we're not permanently maintaining two separate implementations, aim to reuse the new FormSteps-based implementation. Future work should remove the "shared/personal_key" partial and "personal-key-page-controller" script once the IdV app has shipped and stabilized. changelog: Upcoming Features, Identity Verification, Add personal key step screen
Specify address verification method to satisfy expected non-null behavior
**Why**: In the future, at least we can remove the JavaScript implementation pieces related to this view, and keep only the static markup
In 06c31d1, I opted to restore the static markup for the page to support no-JS environments. In the future, assuming we want to continue supporting no-JS for this page, we could at least remove all of the related JavaScript supports ( |
| # rubocop:disable Layout/LineLength | ||
| alias complete_idv_steps_before_confirmation_step complete_idv_steps_with_phone_before_confirmation_step | ||
| # rubocop:enable Layout/LineLength |
There was a problem hiding this comment.
oh yikes I'm surpised we used alias instead of alias_method ... glad to see this go
| steps={[personalKeyStep, personalKeyConfirmStep]} | ||
| initialValues={{ personalKey: appRoot.dataset.personalKey }} | ||
| promptOnNavigate={false} | ||
| onComplete={() => appForm.submit()} |
There was a problem hiding this comment.
silly question, how do the values get in to this form before we submit it? it looks like the form lives outside of appRoot?
There was a problem hiding this comment.
Not a silly question. The server-side controller doesn't actually care about any submitted values 🙃 The personal key is generated when the page is shown, and the form submission is basically just a redirect.
Page show:
identity-idp/app/controllers/accounts/personal_keys_controller.rb
Lines 13 to 22 in 8cb2802
Page submit:
identity-idp/app/controllers/users/personal_keys_controller.rb
Lines 22 to 25 in 8cb2802
There was a problem hiding this comment.
🤦 thanks, I forgot that checking the personal key was all JS before anyways
Why: So that we're not permanently maintaining two separate implementations, aim to reuse the new FormSteps-based implementation. Future work should remove the "shared/personal_key" partial and "personal-key-page-controller" script once the IdV app has shipped and stabilized.
Open questions:
JavascriptRequiredComponentto enforce JS is enabled