Skip to content

LG-6205: Add endpoint, button to trigger password reset (IdV app)#6360

Merged
aduth merged 4 commits intomainfrom
aduth-password-reset-button
May 19, 2022
Merged

LG-6205: Add endpoint, button to trigger password reset (IdV app)#6360
aduth merged 4 commits intomainfrom
aduth-password-reset-button

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented May 17, 2022

Why: So that a user will receive an email to reset their password after confirming to do password reset during identity proofing.

Testing Instructions:

You will need to set the step as enabled in your local config/application.yml:

development:
  idv_api_enabled_steps: '["password_confirm","personal_key","personal_key_confirm"]'
  1. Navigate to http://localhost:3000
  2. Sign in
  3. Navigate to http://localhost:3000/verify
  4. Complete proofing flow up to password confirmation step
  5. Click "Follow these instructions" (adjacent "Forgot your password?")
  6. Click Reset Password button
  7. Observe that you're redirected to a page confirming password reset, including the correct email for the current user

Screen recording:

Screen.Recording.2022-05-17.at.4.45.21.PM.mov

FYI @anniehirshman-gsa @Kamal-Munshi : Since the (current) implementation calls to an API before redirecting, I opted to use the spinner button we use elsewhere for asynchronous page transitions. This button is an outline button, which we haven't implemented as spinner buttons until now.

@aduth
Copy link
Contributor Author

aduth commented May 17, 2022

Prior to pushing this, I had an idea for an alternative implementation, which is to update the password reset controller to have an action which would trigger the password reset. We likely don't want this to be part of the default GET action, but I could imagine a new create method in the controller implementation?

Then, on this page, we could use the <ButtonTo /> component to post to that controller, using the redirectURL context being added in #6323.

I'm open to revising if it seems preferable to others.

@aduth aduth requested review from a team and nprimak May 17, 2022 14:10
@anniehirshman-gsa
Copy link
Contributor

I opted to use the spinner button we use elsewhere for asynchronous page transitions. This button is an outline button, which we haven't implemented as spinner buttons until now.

Loading state style looks nice, thanks for flagging @aduth! Maybe something to put on our next design system office hours agenda for awareness/adding both styles to Figma?

@aduth
Copy link
Contributor Author

aduth commented May 17, 2022

Maybe something to put on our next design system office hours agenda for awareness/adding both styles to Figma?

Good idea! I'll add it to the agenda.

@aduth aduth force-pushed the aduth-password-reset-button branch from b6b1f7a to fe54598 Compare May 17, 2022 20:43
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

aduth added 4 commits May 18, 2022 08:10
**Why**: So that a user will receive an email to reset their password after confirming to do password reset during identity proofing.

changelog: Upcoming Features, Identity Verification, Add password confirmation step
**Why**: Since a ButtonComponent could be nested content (e.g. button_to), finding the adjacent sibling of a button to apply spinner dot coloring is not reliable. Instead, since we have access to the button properties, determine if it's an outline button and apply a modifier class on the wrapper element.
**Why**: Simplify tests to avoid stubbing window global
@aduth aduth force-pushed the aduth-password-reset-button branch from 14310ed to c458ec6 Compare May 18, 2022 12:28
@aduth aduth marked this pull request as ready for review May 18, 2022 12:28
@aduth aduth merged commit aaac9a0 into main May 19, 2022
@aduth aduth deleted the aduth-password-reset-button branch May 19, 2022 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants