flexion / ef-cms

An Electronic Filing / Case Management System.
23 stars 10 forks source link

BUG: Change Email Verification Link Does Not Expire #10313

Open cholly75 opened 7 months ago

cholly75 commented 7 months ago

Describe the Bug When testing #10007 we discovered that the verification link sent in the email as a response the user completing the change email workflow does not actually have an expiration date/time. The email language was changed to indicate that the link expires in an hour 24 hours, however it does not actually do so.

Business Impact/Reason for Severity Low

In which environment did you see this bug? DEV

Who were you logged in as? Petitioner

What were you doing when you discovered this bug? (Using the application, demoing, smoke tests, testing other functionality, etc.) Testing #10007

To Reproduce Steps to reproduce the behavior:

  1. Log in as a DAWSON petitioner
  2. Complete the "Change Email" workflow to change the user email/username
  3. Receive the email w/ the verification link
  4. Wait longer than 1 hour 24 hours
  5. Click the link

Expected Behavior Message received in UI about link having expired

Actual Behavior Verification link works just fine and update to user completes successfully.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Cause of Bug, If Known

Process for Logging a Bug:

Severity Definition:

Definition of Ready for Bugs(Created 10-4-21)

Definition used: A failure or flaw in the system which produces an incorrect or undesired result that deviates from the expected result or behavior. (Note: Expected results are use cases that have been documented in past user stories as acceptance criteria and test cases, and do not include strange behavior unrelated to use cases.)

The following criteria must be met in order for the development team to begin work on the bug.

The bug must:

Process: If the unexpected results are new use cases that have been identified, but not yet built, new acceptance criteria and test cases should be captured in a new user story and prioritized by the product owner.

If the Court is not able to reproduce the bug, add the “Unable to reproduce” tag. This will provide visibility into the type of support that may be needed by the Court. In the event that the Court cannot reproduce the bug, the Court will work with Flexion to communicate what type of troubleshooting help may be needed.

Definition of Done (Updated 4-14-21)

Product Owner

Engineering

ttlenard commented 1 week ago

@Mwindo So sorry! It looks like we failed to update this ticket to be consistent with changes we ended up doing when we implemented login. In the different workflows, we used to have different expirations (1 hour, 24 hours, 7 days, etc.) and we decided to make them all 24 hours. We failed to make this bug consistent with the changes.

Can we please make this a 24 hour expiration instead of a 1 hour? Thank you!

Mwindo commented 1 week ago

@ttlenard No worries at all--I've updated the code and re-deployed to test!

ttlenard commented 1 week ago

@swongCO @mwestereng1 @katiecissell

Now that the link expires, I think we might want to update our error message so that it is clear to the user what is going on. Can you please help in coming up with the appropriate messaging for a user?

Here is the current error message they get when they click on the verification link and it is expired:

image.png

We may also want to consider updating the text in the email they receive as well as that yellow banner that displays when a user does have a pending email that is awaiting verification.

Thanks for the help with this!

mwestereng1 commented 1 week ago

UX Notes:

Link to the Figma File with verification messaging updates:

Email updates: Image

Mwindo commented 4 days ago

After the sentence "After 24 hours, this link will expire." add "If the link is expired, click it to receive a new verification email."

@mwestereng1 I think you mentioned this, and I apologize for not catching on quicker! Now that I've thought about implementation details more, I think there is a modest security issue: there is no point in having an email link expire if clicking the link will just generate a new, fresh link automatically. It's the same as a link that never expires, just with an extra step in between.

The more secure approach, which I should have called out earlier on in the discussions about this ticket, is to force the user to re-trigger the email from within the app. One way to do this is via the notification banner. Since that will be dismissible, however, we would probably also want a "permanent" way to do re-trigger the email, maybe via the My Account > Change Email route, where we already display a pending email address. Maybe we can have a button there that sends a new link, and in the instructions on the email say something like, "If the link is expired, please go to My Account -> Change Email in DAWSON and click the re-send email button."