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): Add Passwordless Sign In with OTP implementation #3386

Merged
merged 4 commits into from
Nov 29, 2023

Conversation

harsh62
Copy link
Member

@harsh62 harsh62 commented Nov 28, 2023

Description

The PR has the following changes:

  • Updates tasks for signInWithOTP and confirmSignInWithOTP
  • Add tests end to end by mocking the service.

General Checklist

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • All integration tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
  • If breaking change, documentation/changelog update with migration instructions

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

@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2023

Codecov Report

Attention: 39 lines in your changes are missing coverage. Please review.

Comparison is base (3ad7de2) 67.74% compared to head (25043e5) 68.13%.

Files Patch % Lines
...nitoAuthPlugin/Task/AWSAuthSignInWithOTPTask.swift 72.41% 32 Missing ⚠️
...hPlugin/Task/AWSAuthConfirmSignInWithOTPTask.swift 54.54% 5 Missing ⚠️
...ons/AWSAuthConfirmSignInWithMagicLinkOptions.swift 0.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@                    Coverage Diff                     @@
##           feat/auth-passwordless    #3386      +/-   ##
==========================================================
+ Coverage                   67.74%   68.13%   +0.38%     
==========================================================
  Files                        1086     1089       +3     
  Lines                       36217    36308      +91     
==========================================================
+ Hits                        24535    24738     +203     
+ Misses                      11682    11570     -112     
Flag Coverage Δ
API_plugin_unit_test 67.07% <ø> (ø)
AWSPluginsCore 64.59% <ø> (ø)
Amplify 47.48% <ø> (+0.01%) ⬆️
Analytics_plugin_unit_test 81.16% <ø> (ø)
Auth_plugin_unit_test 79.24% <72.91%> (+1.26%) ⬆️
CoreMLPredictions_plugin_unit_test 59.44% <ø> (ø)
DataStore_plugin_unit_test 81.07% <ø> (-0.04%) ⬇️
Geo_plugin_unit_test 70.75% <ø> (ø)
Logging_plugin_unit_test 63.09% <ø> (ø)
Predictions_plugin_unit_test 37.29% <ø> (ø)
PushNotifications_plugin_unit_test 87.03% <ø> (ø)
Storage_plugin_unit_test 78.00% <ø> (ø)
unit_tests 68.13% <72.91%> (+0.38%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@harsh62 harsh62 marked this pull request as ready for review November 28, 2023 15:34
@harsh62 harsh62 requested a review from a team as a code owner November 28, 2023 15:34
Copy link
Member

@thisisabhash thisisabhash left a comment

Choose a reason for hiding this comment

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

LGTM

//
import Amplify

public struct AWSAuthConfirmSignInWithMagicLinkOptions {
Copy link
Member

Choose a reason for hiding this comment

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

may be we can add a todo here once we finalize on the options

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a TODO.

@harsh62 harsh62 merged commit 0f01562 into feat/auth-passwordless Nov 29, 2023
57 checks passed
@harsh62 harsh62 deleted the add-otp-implementation branch November 29, 2023 14:53
thisisabhash pushed a commit that referenced this pull request Dec 13, 2023
* feat(Auth): Add Passwordless Sign In with OTP implementation

* update namespacing

* added new options

* worked on review comments
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