-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Authenticator): update state machine to include onDone in federat…
…ed sign in flow (#4978)
- Loading branch information
1 parent
ccad852
commit 7eeb0ae
Showing
16 changed files
with
130 additions
and
68 deletions.
There are no files selected for viewing
This file contains 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,7 @@ | ||
--- | ||
"@aws-amplify/ui-react-core": patch | ||
"@aws-amplify/ui-react-native": patch | ||
"@aws-amplify/ui": patch | ||
--- | ||
|
||
fix(Authenticator): update state machine to include onDone in federated sign in flow |
This file contains 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 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 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 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 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 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 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 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 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
39 changes: 39 additions & 0 deletions
39
packages/ui/src/machines/authenticator/actors/__tests__/__snapshots__/utils.test.ts.snap
This file contains 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,39 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`getFederatedSignInState returns the expected 'federatedSignIn\` state values for the 'signIn' route 1`] = ` | ||
{ | ||
"entry": [ | ||
"sendUpdate", | ||
"clearError", | ||
], | ||
"invoke": { | ||
"onDone": { | ||
"target": "signIn", | ||
}, | ||
"onError": { | ||
"actions": "setRemoteError", | ||
"target": "signIn", | ||
}, | ||
"src": "signInWithRedirect", | ||
}, | ||
} | ||
`; | ||
|
||
exports[`getFederatedSignInState returns the expected 'federatedSignIn\` state values for the 'signUp' route 1`] = ` | ||
{ | ||
"entry": [ | ||
"sendUpdate", | ||
"clearError", | ||
], | ||
"invoke": { | ||
"onDone": { | ||
"target": "signUp", | ||
}, | ||
"onError": { | ||
"actions": "setRemoteError", | ||
"target": "signUp", | ||
}, | ||
"src": "signInWithRedirect", | ||
}, | ||
} | ||
`; |
11 changes: 11 additions & 0 deletions
11
packages/ui/src/machines/authenticator/actors/__tests__/utils.test.ts
This file contains 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,11 @@ | ||
import { getFederatedSignInState } from '../utils'; | ||
|
||
describe('getFederatedSignInState', () => { | ||
it.each(['signIn', 'signUp'])( | ||
"returns the expected 'federatedSignIn` state values for the '%s' route", | ||
(route: 'signIn' | 'signUp') => { | ||
const output = getFederatedSignInState(route); | ||
expect(output).toMatchSnapshot(); | ||
} | ||
); | ||
}); |
This file contains 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
Oops, something went wrong.