-
Notifications
You must be signed in to change notification settings - Fork 125
feat(auth): Overriding sign in when the State machine is already in the signing in state #2187
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0036b87
Override sign in if the user is already in the signing state
gpanshu 4a31f95
Fixing imports
gpanshu cc33f51
Adding cancel sign in when the user is already in signing in stage fo…
gpanshu 575296f
Adding tests
gpanshu b717e71
ktlint fix
gpanshu aa22ed0
Merge branch 'main' into feat-override-signin
gpanshu 8da5f6e
fixing missing case
gpanshu f09dead
ktlint fix
gpanshu 937cf5a
Addressed PR feedback
gpanshu 51b7b8b
lint fix
gpanshu f95f3a9
Fix for failing tests
gpanshu 053ead6
lint fix
gpanshu 0c25624
Removed test that is covered in the parity testing framework/
gpanshu c279ca5
lint fix
gpanshu c28fb7a
Merge branch 'main' into feat-override-signin
tylerjroach 70ff06b
Merge branch 'main' into feat-override-signin
tylerjroach a44e0d6
Merge branch 'main' into feat-override-signin
gpanshu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
...estsuites/signIn/Test_that_overriding_signIn_when_already_signing_in_returns_success.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"description": "Test that overriding signIn when already signing in returns success", | ||
"preConditions": { | ||
"amplify-configuration": "authconfiguration.json", | ||
"state": "SigningIn_SigningIn.json", | ||
"mockedResponses": [ | ||
{ | ||
"type": "cognitoIdentityProvider", | ||
"apiName": "initiateAuth", | ||
"responseType": "success", | ||
"response": { | ||
"challengeName": "PASSWORD_VERIFIER", | ||
"challengeParameters": { | ||
"SALT": "abc", | ||
"SECRET_BLOCK": "secretBlock", | ||
"SRP_B": "def", | ||
"USERNAME": "username", | ||
"USER_ID_FOR_SRP": "userId" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "cognitoIdentityProvider", | ||
"apiName": "respondToAuthChallenge", | ||
"responseType": "success", | ||
"response": { | ||
"session": "someSession", | ||
"challengeName": "SMS_MFA", | ||
"challengeParameters": { | ||
"CODE_DELIVERY_DELIVERY_MEDIUM": "SMS", | ||
"CODE_DELIVERY_DESTINATION": "+12345678900" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"api": { | ||
"name": "signIn", | ||
"params": { | ||
"username": "username", | ||
"password": "password" | ||
}, | ||
"options": { | ||
} | ||
}, | ||
"validations": [ | ||
{ | ||
"type": "amplify", | ||
"apiName": "signIn", | ||
"responseType": "success", | ||
"response": { | ||
"isSignedIn": false, | ||
"nextStep": { | ||
"signInStep": "CONFIRM_SIGN_IN_WITH_SMS_MFA_CODE", | ||
"additionalInfo": { | ||
}, | ||
"codeDeliveryDetails": { | ||
"destination": "+12345678900", | ||
"deliveryMedium": "SMS" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "state", | ||
"expectedState": "SigningIn_SigningIn.json" | ||
} | ||
] | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.