-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Email MFA] Updating fetchMFAPreference and updateMFAPreference #13720
[Email MFA] Updating fetchMFAPreference and updateMFAPreference #13720
Conversation
packages/auth/__tests__/providers/cognito/updateMFAPreference.test.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
preferred: 'SMS', | ||
enabled: ['SMS', 'TOTP', 'EMAIL'], | ||
}); | ||
expect(mockGetUser).toHaveBeenCalledTimes(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we can remove these two expect since it is implied when u check fetchMFAPrefeernce that it is called. I dont think it brings in much value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh yeah, I see your point. I'll remove them.
* add EMAIL MFA option in fetchMFAPreference * add EMAIL MFA option in updateMFAPreference * update fetchMFAPreference tests * update updateMFAPreference tests * update bundle size * remove redundant assertions
* [Email MFA] Updating fetchMFAPreference and updateMFAPreference (#13720) * add EMAIL MFA option in fetchMFAPreference * add EMAIL MFA option in updateMFAPreference * update fetchMFAPreference tests * update updateMFAPreference tests * update bundle size * remove redundant assertions * [Email MFA] Add support for EMAIL_OTP during sign in flows (#13745) * Confirm Sign In With Email OTP * Confirm Sign In Tests With Email OTP * Update packages/auth/src/types/models.ts Co-authored-by: israx <[email protected]> * Fix Errant Pascal Casing --------- Co-authored-by: israx <[email protected]> * feat(auth): [EMAIL MFA] Sign In / Confirm Sign In With MFA_SETUP (#13760) * Sign In / Confirm Sign In With MFA_SETUP * Sign In State Management Tests * Confirm Sign In Happy Path Tests * Fix State Management Tests * Apply Feedback * loose email matching * Remove Unnecessary Export * Update SignInHelpers For Getting Allowed MFA Setup Types * Add Error Case Unit Tests * feat(auth): [EMAIL MFA] enable integ tests with backend configuration swapping (#13794) * chore: enable mfa integ tests * chore: add mfa-setup test def * chore: temporarily enable push integ tests * chore: disable push integ tests * chore: address test strategy feedback * chore: use trimmed challenge response * chore: improved naming * chore: update bundle size tests * chore: remove trimmed challenge response --------- Co-authored-by: israx <[email protected]>
Description of changes
The purpose of this pull request is to update the fetchMFAPreference and updateMFAPreference APIs to support the new Email MFA option.
Issue #, if available
Description of how you validated changes
Checklist
yarn test
passesChecklist for repo maintainers
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.