diff --git a/.changeset/orange-falcons-act.md b/.changeset/orange-falcons-act.md new file mode 100644 index 00000000000..569130177e6 --- /dev/null +++ b/.changeset/orange-falcons-act.md @@ -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 diff --git a/examples/react-native/ios/Podfile.lock b/examples/react-native/ios/Podfile.lock index a27ba1badc6..52299ee9509 100644 --- a/examples/react-native/ios/Podfile.lock +++ b/examples/react-native/ios/Podfile.lock @@ -547,4 +547,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 86255707601fa0f502375c1c40775dbd535ed624 -COCOAPODS: 1.12.1 +COCOAPODS: 1.14.3 diff --git a/packages/react-core/src/Authenticator/hooks/useAuthenticatorRoute/__tests__/__snapshots__/useAuthenticatorRoute.spec.ts.snap b/packages/react-core/src/Authenticator/hooks/useAuthenticatorRoute/__tests__/__snapshots__/useAuthenticatorRoute.spec.ts.snap index f58fbbfdf12..c8119f221f5 100644 --- a/packages/react-core/src/Authenticator/hooks/useAuthenticatorRoute/__tests__/__snapshots__/useAuthenticatorRoute.spec.ts.snap +++ b/packages/react-core/src/Authenticator/hooks/useAuthenticatorRoute/__tests__/__snapshots__/useAuthenticatorRoute.spec.ts.snap @@ -162,6 +162,7 @@ exports[`useAuthenticatorRoute returns the expected values for the signUp route "hasValidationErrors": false, "isPending": false, "socialProviders": [], + "toFederatedSignIn": [MockFunction], "toSignIn": [MockFunction], "validationErrors": {}, }, diff --git a/packages/react-core/src/Authenticator/hooks/useAuthenticatorRoute/__tests__/utils.spec.ts b/packages/react-core/src/Authenticator/hooks/useAuthenticatorRoute/__tests__/utils.spec.ts index 3c114783f27..30bb7807f36 100644 --- a/packages/react-core/src/Authenticator/hooks/useAuthenticatorRoute/__tests__/utils.spec.ts +++ b/packages/react-core/src/Authenticator/hooks/useAuthenticatorRoute/__tests__/utils.spec.ts @@ -115,6 +115,7 @@ describe('getRouteMachineSelector', () => { ...commonSelectorProps, hasValidationErrors, socialProviders, + toFederatedSignIn, toSignIn, validationErrors, route, @@ -186,6 +187,7 @@ describe('props resolver functions', () => { hasValidationErrors, isPending, socialProviders, + toFederatedSignIn, toSignIn, validationErrors, }, diff --git a/packages/react-core/src/Authenticator/hooks/useAuthenticatorRoute/constants.ts b/packages/react-core/src/Authenticator/hooks/useAuthenticatorRoute/constants.ts index e882630429c..6999664eb68 100644 --- a/packages/react-core/src/Authenticator/hooks/useAuthenticatorRoute/constants.ts +++ b/packages/react-core/src/Authenticator/hooks/useAuthenticatorRoute/constants.ts @@ -76,6 +76,7 @@ const SIGN_UP_MACHINE_KEYS: SignUpMachineKey[] = [ ...COMMON_ROUTE_MACHINE_KEYS, 'hasValidationErrors', 'socialProviders', + 'toFederatedSignIn', 'toSignIn', 'validationErrors', ]; diff --git a/packages/react-native/src/Authenticator/common/DefaultContent/DefaultContent.tsx b/packages/react-native/src/Authenticator/common/DefaultContent/DefaultContent.tsx index e303315175a..6ed12ad08d9 100644 --- a/packages/react-native/src/Authenticator/common/DefaultContent/DefaultContent.tsx +++ b/packages/react-native/src/Authenticator/common/DefaultContent/DefaultContent.tsx @@ -14,7 +14,7 @@ function useThemedStyles