Task/verify 2fa code#2221
Merged
Merged
Conversation
- Add verify-mobile-number.html page - Add new route `verify_mobile_number` - Add `validate_2fa_method` to the `user_api_client` which calls the api to verify a 2fa code without disturbing the users browser session
🧪 Review environmenthttps://htjj75efjjcnza5kxm5ddcexfq0nuddz.lambda-url.ca-central-1.on.aws/ |
- Removing an existing phone number sets the verified_phonenumber to false in the db. - Utilize the new verify phone number designs when changing or adding a phone number via the profile page - Added proper back_link handling on the confirmation page - Ensure that when a user clicks the back button after resending a verification code from the update or add phone number view that they are redirected to the correct page
- Add a flow for when the user tries wants to add SMS 2fa auth have not added a phone number to their profile yet - Select SMS auth -> add their phone number -> enter verify code -> auth is changed to SMS
Contributor
|
Tested this, and it looks good, just a question about the flow plus catching an error when a user enters an old code. (discussed offline) |
jzbahrai
reviewed
Jul 15, 2025
- Adding a phone number to your profile no longer requires verification - Fixed a bug where incorrect verify codes were not being handled correctly and errors not properly displayed to the user.
jzbahrai
reviewed
Jul 16, 2025
jzbahrai
approved these changes
Jul 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary | Résumé
This PR adds a new page to verify a users mobile phone number from the Profile page. It also adds a flow for when the user tries wants to add SMS 2fa auth have not added a phone number to their profile yet:
Select SMS auth -> add their phone number -> enter verify code -> auth is changed to SMS
Related
Test instructions | Instructions pour tester la modification
Throughout these flow's test the back links to ensure they move to pages that make sense given the context. Especially during the flow of change 2FA to SMS when you don't have an existing phone number already as there are multiple intertwined steps here.
Between the different verification states, keep your eye on the verification badges to ensure they properly reflect
verifiedandunverifiedstates in the UI.Add new phone number verifies correctly
verified_phonenumberfield was set toTrueChange 2FA methodpage and ensure that theverifiedbadge is present.Removing your phone number de-verifies
verified_phonenumbercolumn was set toFalseChange 2FA methodpage and ensure that theun-verifiedbadge is present.Setting SMS 2FA without a Phone number
Change2FA methodun-verifiedbadge is presentverified_phonenumberfield was set toTrueauth_typecolumn was set tosms_authRemoving your phone number defaults auth type to email
verified_phonenumbercolumn was set toFalseauth_typecolumn was set toemail_authAuth type can be set to SMS with existing phone number
Your profilesection, not theSecuritysection and verify it.verified_phonenumberfield was set toTrueauth_typecolumn was set tosms_auth