Skip to content
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

Passcodes | Update expired functionality for create account/reset password #3057

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

coldlink
Copy link
Member

@coldlink coldlink commented Feb 6, 2025

What does this change?

Previously when the passcode had expired, or had been incorrect multiple times, we'd redirect users to the older /welcome/expired page for create account (register), and /reset-password/expired for reset password.

The problem with these pages is that the copy and UX was more suited to when a link rather than code had expired/invalidated.

Instead we now take the same approach as taken on the Sign In page, where we redirect back to the initial page the user took the action on, but show an error with context saying their code had expired, and to receive a new one instead.

We also add a new errors grouping, specifically for passcodes, called PasscodeErrors.

Previous behaviour - Reset password Previous behaviour - Create account New behaviour - Reset password New behaviour - Create account
Screen.Recording.2025-02-06.at.15.55.45.mov
Screen.Recording.2025-02-06.at.15.57.00.mov
Screen.Recording.2025-02-06.at.15.58.46.mov
Screen.Recording.2025-02-06.at.15.59.25.mov

Tested

  • DEV
  • CODE

…password

Previously when the passcode had expired, or had been incorrect multiple times, we'd redirect users to the older `/welcome/expired` page for create account (register), and `/reset-password/expired` for reset password.

The problem with these pages is that the copy and UX was more suited to when a link rather than code had expired/invalidated.

Instead we now take the same approach as taken on the Sign In page, where we redirect back to the initial page the user took the action on, but show an error with context saying their code had expired, and to receive a new one instead.
@coldlink coldlink added the passwordless PRs/Issues related to passwordless/passcode functionality label Feb 6, 2025
@coldlink coldlink requested a review from a team as a code owner February 6, 2025 15:52
@coldlink coldlink changed the title Passcodes | Update expired functionality for register/reset password Passcodes | Update expired functionality for create account/reset password Feb 6, 2025
Comment on lines +18 to +22
export const PasscodeErrors = {
PASSCODE_INVALID: 'Incorrect code',
PASSCODE_EXPIRED: 'Your code has expired',
} as const;

Copy link
Member Author

@coldlink coldlink Feb 6, 2025

Choose a reason for hiding this comment

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

TODO (at some point): refactor the rest of the errors to use as const instead of enums

@coldlink coldlink merged commit 14ba445 into main Feb 6, 2025
21 checks passed
@coldlink coldlink deleted the mm/passcode-expired-page branch February 6, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
passwordless PRs/Issues related to passwordless/passcode functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants