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

Fixes issue with swapping primary emails and unblock code #12757

Merged
merged 1 commit into from
May 4, 2022
Merged

Conversation

vbudhram
Copy link
Contributor

@vbudhram vbudhram commented May 4, 2022

Because:

  • We found an edge case where the unblock code was consistently considered invalid
  • I believe that this bug is actually an artifact of how we test the unblock feature, we have logic to force emails through the unblock flow when email starts with blocked. This logic only exists for testing and would not be hit by a regular user

This pull request

  • This PR is based on the work that Dan started in fix(auth): Invalid unblock code after swapping primary email #12729
  • Fixes occasional race condition in consume unblock code stored procedure
  • Added additional functional test to ensure that the right errors are shown to user
  • Fixes email/password screen to show the users current primary email address

Issue that this pull request solves

Closes: #12457 #12109

Checklist

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

@vbudhram vbudhram self-assigned this May 4, 2022
@vbudhram vbudhram requested a review from a team as a code owner May 4, 2022 14:49
@vbudhram vbudhram requested a review from dschom May 4, 2022 16:05
Copy link
Contributor

@dschom dschom left a comment

Choose a reason for hiding this comment

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

LGTM!

Because:
- We found an edge case where the unblock code was consistently considered invalid

This Commit:
- Fixes occasional race condition in consume unblock code stored procedure.
- Fixes a small bug in the test framework where the most recently emailed unblock code wasn't being used.
- Fixes 'unblock code' remote test. Check for error should be directly after call second call to db.consumeUnblockCode.
@vbudhram vbudhram merged commit 0b778c5 into main May 4, 2022
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.

Invalid authorization code error displayed after swapping primary and secondary emails
2 participants