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

feat(auth): refractor passwordless auth interface #12718

Conversation

AllanZhengYP
Copy link
Member

@AllanZhengYP AllanZhengYP commented Dec 18, 2023

Description of changes

Set up passwordless APIs to reflect approved API designs

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.

@AllanZhengYP AllanZhengYP force-pushed the feat/passwordless-auth-zheallan-rev4.1 branch from 4c49d2a to b646849 Compare December 20, 2023 01:15
@AllanZhengYP AllanZhengYP marked this pull request as ready for review December 20, 2023 01:15
@AllanZhengYP AllanZhengYP requested a review from a team as a code owner December 20, 2023 01:15
@AllanZhengYP AllanZhengYP force-pushed the feat/passwordless-auth-zheallan-rev4.1 branch from b646849 to 9a31e50 Compare December 20, 2023 01:21
@AllanZhengYP AllanZhengYP requested a review from a team as a code owner December 20, 2023 01:21
Copy link
Member

@calebpollman calebpollman left a comment

Choose a reason for hiding this comment

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

Great start! Mostly left feedback/questions on the interfaces

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! Some nits, and I agree with some feedback from the other reviewers.

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.

Thanks @AllanZhengYP for putting this together. If the outputs are going to be discriminated unions, wondering if it make sense to explicitly define the type values for isSignUpComplete and isSignedIn ?

I also noticed that this PR is not changing the confirmSignIn API correct ?

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

) {
const { options, passwordless } = input;
if (passwordless) {
// Iterate through signUpPasswordless calls to make TypeScript happy
Copy link
Member

Choose a reason for hiding this comment

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

Whats the issue without iterating?

Copy link
Member

@calebpollman calebpollman left a comment

Choose a reason for hiding this comment

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

Left some feedback/thoughts on alignment of interface naming conventions and replacing the usage of existing input/output interfaces (SignInInput, SignInOutput, etc). Also would like to see the extraneous optional never keys removed 😅

@AllanZhengYP AllanZhengYP merged commit 5412477 into aws-amplify:feat/passwordless-auth Dec 28, 2023
25 of 28 checks passed
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.

6 participants