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

[Email MFA] Updating fetchMFAPreference and updateMFAPreference #13720

Merged

Conversation

jjarvisp
Copy link
Member

@jjarvisp jjarvisp commented Aug 15, 2024

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

  • Manual testing
  • Unit tests added / modified

Checklist

  • PR description included
  • yarn test passes
  • Unit Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

Checklist for repo maintainers

  • Verify E2E tests for existing workflows are working as expected or add E2E tests for newly added workflows
  • New source file paths included in this PR have been added to CODEOWNERS, if appropriate

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Member

@israx israx left a 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!

@jjarvisp jjarvisp marked this pull request as ready for review August 19, 2024 15:35
Copy link
Contributor

@jimblanc jimblanc left a 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);
Copy link
Member

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

Copy link
Member Author

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.

@jjarvisp jjarvisp merged commit 4ed4918 into aws-amplify:feat/email-mfa Aug 20, 2024
28 checks passed
jjarvisp added a commit that referenced this pull request Sep 6, 2024
* add EMAIL MFA option in fetchMFAPreference

* add EMAIL MFA option in updateMFAPreference

* update fetchMFAPreference tests

* update updateMFAPreference tests

* update bundle size

* remove redundant assertions
jjarvisp added a commit that referenced this pull request Oct 31, 2024
* [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]>
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.

4 participants