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

fix(auth): signUp should always return a userId #13181

Merged
merged 7 commits into from
Mar 27, 2024

Conversation

ashwinkumar6
Copy link
Member

@ashwinkumar6 ashwinkumar6 commented Mar 27, 2024

Description of changes

  • signUp API to always return userId in all steps
  • restructure existing unit tests
  • add unit tests for all signUp return path

Issue #, if available

#12998

Description of how you validated changes

Tested the following flows and verified signUp always contains a userId

  1. signUp (code) -> confirmSignUp -> signIn
  2. signUp (link) -> verify user using link -> signIn
  3. signUp -> Pre sign-up Lambda trigger -> signIn
  4. signUp (code, autoSignIn) -> confirmSignUp -> autoSignIn
  5. signUp (link, autoSignIn) -> verify user using link -> autoSignIn
  6. signUp (autoSignIn) -> Pre sign-up Lambda trigger -> autoSignIn

Checklist

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

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

@ashwinkumar6 ashwinkumar6 changed the title fix(auth): signup should always return a userId fix(auth): signUp should always return a userId Mar 27, 2024
@ashwinkumar6 ashwinkumar6 marked this pull request as ready for review March 27, 2024 18:00
@ashwinkumar6 ashwinkumar6 requested a review from a team as a code owner March 27, 2024 18:00
israx
israx previously approved these changes Mar 27, 2024
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.

LGTM. Thanks @ashwinkumar6

ashwinkumar6 and others added 2 commits March 27, 2024 12:25
@ashwinkumar6 ashwinkumar6 dismissed stale reviews from israx and cshfang via 9f27ce5 March 27, 2024 19:25
@ashwinkumar6 ashwinkumar6 merged commit 962179b into aws-amplify:main Mar 27, 2024
30 checks passed
Samaritan1011001 pushed a commit that referenced this pull request Apr 1, 2024
* fix(auth): signup should always return a userId

* add unit tests

* Update packages/auth/__tests__/providers/cognito/signUp.test.ts

Co-authored-by: Chris F <5827964+cshfang@users.noreply.github.com>

* address feedback

---------

Co-authored-by: Ashwin Kumar <ashwsrir@amazon.com>
Co-authored-by: Chris F <5827964+cshfang@users.noreply.github.com>
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.

3 participants