From 1ac4dfa2ce1ebc7711b2e16f72055ec5285e3cb3 Mon Sep 17 00:00:00 2001 From: Heather Buchel Date: Fri, 10 Nov 2023 10:44:48 -0500 Subject: [PATCH 01/29] fix missing package.json update for angular cli 16 build system test (#4687) --- build-system-tests/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-system-tests/package.json b/build-system-tests/package.json index ebd154a5417..c939a24bc2a 100644 --- a/build-system-tests/package.json +++ b/build-system-tests/package.json @@ -29,7 +29,7 @@ "react-latest-cra-latest-js": "npm run setup:react:cra -- -l js", "react-17-next-11-ts": "npm run setup:react:next -- -f 17 -b 11", "react-latest-vite-2-ts": "npm run setup:react:vite -- -b 2", - "angular-latest-angular-cli-latest-ts": "npm run setup:angular:cli", + "angular-latest-angular-cli-16-ts": "npm run setup:angular:cli -- -b 16", "angular-14-angular-cli-14-ts": "npm run setup:angular:cli -- -f 14 -b 14 -n angular-latest-angular-cli-v14-ts", "vue-3-vue-cli-latest-ts": "npm run setup:vue:cli -- -f 3 -P yarn", "vue-latest-vite-latest-ts": "npm run setup:vue:vite", From 4742160fb53c431c12045bd20b3526d2de65d1cf Mon Sep 17 00:00:00 2001 From: Caleb Pollman Date: Sun, 12 Nov 2023 10:27:32 -0800 Subject: [PATCH 02/29] chore(authenticator): migrate state machine (#4680) Co-authored-by: Scott Rees <6165315+reesscot@users.noreply.github.com> --- .../e2e/features/signin}/hub-events.feature | 17 +- .../advanced/current-route.angular.mdx | 4 +- .../advanced/current-route.react-native.mdx | 4 +- .../advanced/current-route.react.mdx | 4 +- .../advanced/current-route.vue.mdx | 4 +- .../advanced/example.angular.mdx | 2 +- .../advanced/example.react-native.mdx | 4 +- .../authenticator/advanced/example.react.mdx | 4 +- .../authenticator/advanced/example.vue.mdx | 4 +- .../authenticator/advanced/index.page.mdx | 8 +- ...initialState.resetPassword.example.web.mdx | 2 +- ...nitialState.resetPassword.react-native.mdx | 2 +- .../customization.headers-and-footers.web.mdx | 4 +- .../customization.labels-and-text.web.mdx | 2 +- .../formfields/form-fields.web.mdx | 8 +- .../formfields/qrcode/form-fields.angular.mdx | 2 +- .../formfields/qrcode/form-fields.react.mdx | 2 +- .../formfields/qrcode/form-fields.vue.mdx | 2 +- .../angular/src/app/app-routing.module.ts | 4 +- examples/angular/src/app/app.module.ts | 4 +- .../custom-slots/custom-slots.component.html | 2 +- .../custom-slots/custom-slots.component.ts | 4 +- .../reset-password.component.html | 2 +- .../reset-password.component.ts | 2 +- .../sign-in-sms-mfa.component.ts | 3 +- .../sign-in-totp-mfa.component.ts | 2 +- .../sign-up-with-email.component.ts | 33 +- .../authenticator/custom-slots/index.page.tsx | 10 +- .../authenticator/i18n/index.page.tsx | 1 - .../reset-password/index.page.tsx | 2 +- .../sign-in-sms-mfa/index.page.tsx | 4 +- .../sign-in-totp-mfa/index.page.tsx | 2 +- .../sign-in-with-phone/index.page.tsx | 1 - .../sign-up-with-email/index.page.tsx | 26 +- .../authenticator/reset-password/Example.tsx | 6 +- .../sign-up-with-email/Example.tsx | 1 - .../social-providers/Example.tsx | 6 +- .../social-providers/aws-exports.js | 9 +- examples/vue/src/main.ts | 8 - .../authenticator/custom-slots/index.vue | 8 +- .../components/authenticator/i18n/index.vue | 1 - .../authenticator/reset-password/index.vue | 2 +- .../authenticator/sign-in-sms-mfa/index.vue | 4 +- .../authenticator/sign-in-totp-mfa/index.vue | 4 +- .../sign-in-with-phone/index.vue | 1 - .../sign-up-with-email/index.vue | 33 +- .../authenticator/authenticator.module.ts | 4 +- .../authenticator.component.html | 10 +- .../forgot-password.component.html} | 6 +- .../forgot-password.component.ts} | 8 +- .../authenticator/components/index.ts | 2 +- .../setup-totp/setup-totp.component.html | 2 +- .../setup-totp/setup-totp.component.spec.ts | 2 +- .../setup-totp/setup-totp.component.ts | 10 +- .../components/sign-in/sign-in.component.html | 2 +- .../verify-user/verify-user.component.html | 6 +- .../verify-user/verify-user.component.ts | 8 +- .../src/lib/services/authenticator.service.ts | 10 +- .../e2e/cypress/fixtures/auto-sign-in.json | 8 + .../fixtures/confirm-user-attribute.json | 1 + ...etch-user-attributes-unverified-email.json | 8 + .../fixtures/forgot-password-email.json | 9 + .../cypress/fixtures/forgot-password-sms.json | 9 + .../fixtures/limit-exceeded-exception.json | 4 + .../resend-confirmation-code-email.json | 7 + .../resend-confirmation-code-sms.json | 7 + .../user-attribute-verification-code.json | 7 + .../user-not-confirmed-exception.json | 4 + .../e2e/cypress/integration/common/shared.ts | 8 +- .../authenticator/confirm-sign-up.feature | 3 +- .../authenticator/custom-slots.feature | 8 +- .../authenticator/form-fields.feature | 3 +- .../authenticator/reset-password.feature | 6 +- .../authenticator/sign-in-sms-mfa.feature | 27 +- .../authenticator/sign-in-totp-mfa.feature | 8 +- .../authenticator/sign-in-with-email.feature | 23 +- .../authenticator/sign-in-with-phone.feature | 2 + .../sign-in-with-username.feature | 4 +- .../authenticator/sign-up-sms-mfa.feature | 6 +- .../authenticator/verify-user.feature | 7 +- .../context/ComponentRoute/constants.ts | 4 +- .../context/ComponentRoute/types.ts | 6 +- .../DisplayText/i18n/__tests__/index.spec.ts | 6 +- .../context/DisplayText/types.ts | 7 +- .../context/Machine/__mock__/useMachine.ts | 4 +- .../Machine/__tests__/MachineContext.spec.tsx | 2 +- .../MachineContext.spec.tsx.snap | 2 +- .../__tests__/createProvider.spec.tsx | 3 - .../hooks/__mocks__/components.ts | 20 +- .../src/Authenticator/hooks/constants.ts | 8 +- .../src/Authenticator/hooks/types.ts | 15 +- .../__mock__/useAuthenticator.ts | 15 +- .../useAuthenticator.spec.tsx.snap | 5 +- .../__tests__/useAuthenticator.spec.tsx | 11 +- .../useAuthenticator/__tests__/utils.spec.tsx | 4 +- .../hooks/useAuthenticator/types.ts | 4 +- .../useAuthenticator/useAuthenticator.ts | 10 +- .../hooks/useAuthenticator/utils.ts | 14 +- .../useAuthenticatorInitMachine.tsx | 1 + .../useAuthenticatorRoute.spec.ts.snap | 7 +- .../__tests__/utils.spec.ts | 34 +- .../hooks/useAuthenticatorRoute/constants.ts | 13 +- .../hooks/useAuthenticatorRoute/types.ts | 12 +- .../useAuthenticatorRoute.ts | 20 +- .../hooks/useAuthenticatorRoute/utils.ts | 23 +- .../src/Authenticator/Authenticator.tsx | 12 +- .../ForgotPassword.tsx} | 6 +- .../__tests__/ForgotPassword.spec.tsx} | 16 +- .../ForgotPassword.spec.tsx.snap} | 0 .../Defaults/ForgotPassword/index.ts | 1 + .../Defaults/ResetPassword/index.ts | 1 - .../Authenticator/Defaults/SetupTOTP/index.ts | 1 - .../SetupTOTP.tsx => SetupTotp/SetupTotp.tsx} | 26 +- .../__tests__/SetupTotp.spec.tsx} | 23 +- .../__snapshots__/SetupTotp.spec.tsx.snap} | 4 +- .../Authenticator/Defaults/SetupTotp/index.ts | 1 + .../{SetupTOTP => SetupTotp}/styles.ts | 4 +- .../Authenticator/Defaults/SignIn/SignIn.tsx | 6 +- .../Defaults/SignIn/__tests__/SignIn.spec.tsx | 2 +- .../__snapshots__/SignIn.spec.tsx.snap | 4 +- .../Defaults/SignUp/__tests__/SignUp.spec.tsx | 2 +- .../__snapshots__/SignUp.spec.tsx.snap | 4 +- .../src/Authenticator/Defaults/index.ts | 4 +- .../src/Authenticator/Defaults/types.ts | 26 +- .../FederatedProviderButton.tsx | 2 +- .../FederatedProviderButton.spec.tsx.snap | 8 +- .../FederatedProviderButtons.spec.tsx.snap | 4 +- .../hooks/useMessageProps/types.ts | 2 +- .../Authenticator/Authenticator.tsx | 6 +- .../ConfirmResetPassword.tsx | 0 .../ForgotPassword.tsx} | 0 .../index.ts | 2 +- .../Authenticator/Router/Router.tsx | 10 +- .../Authenticator/SetupTOTP/index.ts | 1 - .../SetupTOTP.tsx => SetupTotp/SetupTotp.tsx} | 28 +- .../__tests__/SetupTotp.test.tsx} | 18 +- .../Authenticator/SetupTotp/index.ts | 1 + .../Authenticator/SignIn/SignIn.tsx | 6 +- .../Authenticator/VerifyUser/VerifyUser.tsx | 12 +- .../useCustomComponents/defaultComponents.tsx | 12 +- packages/ui/jest.config.ts | 8 +- .../__tests__/authenticatorTextUtil.test.ts | 12 +- .../authenticator/__tests__/context.test.ts | 61 -- .../__tests__/defaultAuthHubHandler.test.ts | 10 +- .../authenticator/__tests__/facade.test.ts | 79 +- .../__tests__/listenToAuthHub.test.ts | 34 - .../authenticator/__tests__/textUtil.test.ts | 3 +- .../ui/src/helpers/authenticator/actor.ts | 2 +- .../ui/src/helpers/authenticator/constants.ts | 6 +- .../ui/src/helpers/authenticator/context.ts | 33 - .../authenticator/defaultAuthHubHandler.ts | 89 ++ .../ui/src/helpers/authenticator/facade.ts | 60 +- .../__snapshots__/formFields.spec.ts.snap | 2 +- .../formFields/__tests__/defaults.test.ts | 13 +- .../formFields/__tests__/formFields.spec.ts | 10 +- .../__tests__/{util.test.ts => utils.test.ts} | 23 +- .../authenticator/formFields/defaults.ts | 49 +- .../authenticator/formFields/formFields.ts | 9 +- .../helpers/authenticator/formFields/index.ts | 2 +- .../formFields/{util.ts => utils.ts} | 10 + .../ui/src/helpers/authenticator/getRoute.ts | 63 ++ .../ui/src/helpers/authenticator/index.ts | 3 +- .../ui/src/helpers/authenticator/textUtil.ts | 22 +- .../authenticator/types.ts} | 12 +- .../ui/src/helpers/authenticator/utils.ts | 160 ---- .../authenticator/__tests__/actions.test.ts | 85 -- .../__tests__/defaultServices.test.ts | 106 +-- .../authenticator/__tests__/index.test.ts | 88 +- .../ui/src/machines/authenticator/actions.ts | 465 ++++++---- ...assword.test.ts => forgotPassword.test.ts} | 51 +- .../actors/__tests__/signIn.test.ts | 87 +- .../{ => actors}/__tests__/signUp.test.ts | 20 +- .../{resetPassword.ts => forgotPassword.ts} | 174 ++-- .../machines/authenticator/actors/index.ts | 4 +- .../machines/authenticator/actors/signIn.ts | 796 +++++------------- .../machines/authenticator/actors/signOut.ts | 10 +- .../machines/authenticator/actors/signUp.ts | 386 +++++++++ .../actors/verifyUserAttributes.ts | 145 ++++ .../machines/authenticator/defaultServices.ts | 85 +- .../ui/src/machines/authenticator/guards.ts | 164 ++++ .../ui/src/machines/authenticator/index.ts | 417 ++++----- .../ui/src/machines/authenticator/signUp.ts | 411 --------- .../ui/src/machines/authenticator/types.ts | 223 +++++ packages/ui/src/machines/index.ts | 1 + packages/ui/src/types/authenticator/form.ts | 4 +- packages/ui/src/types/authenticator/index.ts | 1 - .../authenticator/stateMachine/context.ts | 143 ---- .../types/authenticator/stateMachine/event.ts | 39 - .../types/authenticator/stateMachine/index.ts | 4 - .../types/authenticator/stateMachine/state.ts | 20 - packages/ui/src/types/authenticator/user.ts | 26 +- packages/vue/.lintstagedrc.cjs | 6 + .../__snapshots__/exports.spec.ts.snap | 2 +- packages/vue/package.json | 9 +- .../__snapshots__/authenticator.spec.ts.snap | 4 +- ...c.ts.snap => forgot-password.spec.ts.snap} | 2 +- .../__snapshots__/setup-totp.spec.ts.snap | 6 +- .../__tests__/authenticator.spec.ts | 8 +- .../__tests__/confirm-reset-password.spec.ts | 6 +- .../__tests__/confirm-sign-in.spec.ts | 6 +- .../__tests__/confirm-sign-up.spec.ts | 6 +- .../__tests__/confirm-verify-user.spec.ts | 6 +- .../__tests__/force-new-password.spec.ts | 6 +- ...ssword.spec.ts => forgot-password.spec.ts} | 24 +- .../components/__tests__/setup-totp.spec.ts | 34 +- .../src/components/__tests__/sign-in.spec.ts | 8 +- .../src/components/__tests__/sign-up.spec.ts | 16 +- .../components/__tests__/verify-user.spec.ts | 12 +- packages/vue/src/components/authenticator.vue | 30 +- ...reset-password.vue => forgot-password.vue} | 2 +- packages/vue/src/components/index.ts | 2 +- packages/vue/src/components/setup-totp.vue | 16 +- packages/vue/src/components/sign-in.vue | 4 +- packages/vue/src/components/verify-user.vue | 4 +- .../__mock__/useAuthenticatorMock.ts | 5 +- .../composables/__tests__/getQRFields.spec.ts | 4 +- .../__tests__/useAuthenticator.spec.ts | 4 +- packages/vue/src/composables/useAuth.ts | 6 +- packages/vue/src/index.ts | 6 +- 219 files changed, 2832 insertions(+), 3150 deletions(-) rename {packages/e2e/features/ui/components/authenticator => canary/e2e/features/signin}/hub-events.feature (68%) rename packages/angular/projects/ui-angular/src/lib/components/authenticator/components/{reset-password/reset-password.component.html => forgot-password/forgot-password.component.html} (83%) rename packages/angular/projects/ui-angular/src/lib/components/authenticator/components/{reset-password/reset-password.component.ts => forgot-password/forgot-password.component.ts} (83%) create mode 100644 packages/e2e/cypress/fixtures/auto-sign-in.json create mode 100644 packages/e2e/cypress/fixtures/confirm-user-attribute.json create mode 100644 packages/e2e/cypress/fixtures/fetch-user-attributes-unverified-email.json create mode 100644 packages/e2e/cypress/fixtures/forgot-password-email.json create mode 100644 packages/e2e/cypress/fixtures/forgot-password-sms.json create mode 100644 packages/e2e/cypress/fixtures/limit-exceeded-exception.json create mode 100644 packages/e2e/cypress/fixtures/resend-confirmation-code-email.json create mode 100644 packages/e2e/cypress/fixtures/resend-confirmation-code-sms.json create mode 100644 packages/e2e/cypress/fixtures/user-attribute-verification-code.json create mode 100644 packages/e2e/cypress/fixtures/user-not-confirmed-exception.json rename packages/react-native/src/Authenticator/Defaults/{ResetPassword/ResetPassword.tsx => ForgotPassword/ForgotPassword.tsx} (92%) rename packages/react-native/src/Authenticator/Defaults/{ResetPassword/__tests__/ResetPassword.spec.tsx => ForgotPassword/__tests__/ForgotPassword.spec.tsx} (81%) rename packages/react-native/src/Authenticator/Defaults/{ResetPassword/__tests__/__snapshots__/ResetPassword.spec.tsx.snap => ForgotPassword/__tests__/__snapshots__/ForgotPassword.spec.tsx.snap} (100%) create mode 100644 packages/react-native/src/Authenticator/Defaults/ForgotPassword/index.ts delete mode 100644 packages/react-native/src/Authenticator/Defaults/ResetPassword/index.ts delete mode 100644 packages/react-native/src/Authenticator/Defaults/SetupTOTP/index.ts rename packages/react-native/src/Authenticator/Defaults/{SetupTOTP/SetupTOTP.tsx => SetupTotp/SetupTotp.tsx} (79%) rename packages/react-native/src/Authenticator/Defaults/{SetupTOTP/__tests__/SetupTOTP.spec.tsx => SetupTotp/__tests__/SetupTotp.spec.tsx} (78%) rename packages/react-native/src/Authenticator/Defaults/{SetupTOTP/__tests__/__snapshots__/SetupTOTP.spec.tsx.snap => SetupTotp/__tests__/__snapshots__/SetupTotp.spec.tsx.snap} (99%) create mode 100644 packages/react-native/src/Authenticator/Defaults/SetupTotp/index.ts rename packages/react-native/src/Authenticator/Defaults/{SetupTOTP => SetupTotp}/styles.ts (68%) rename packages/react/src/components/Authenticator/{ResetPassword => ForgotPassword}/ConfirmResetPassword.tsx (100%) rename packages/react/src/components/Authenticator/{ResetPassword/ResetPassword.tsx => ForgotPassword/ForgotPassword.tsx} (100%) rename packages/react/src/components/Authenticator/{ResetPassword => ForgotPassword}/index.ts (54%) delete mode 100644 packages/react/src/components/Authenticator/SetupTOTP/index.ts rename packages/react/src/components/Authenticator/{SetupTOTP/SetupTOTP.tsx => SetupTotp/SetupTotp.tsx} (83%) rename packages/react/src/components/Authenticator/{SetupTOTP/__tests__/SetupTOTP.test.tsx => SetupTotp/__tests__/SetupTotp.test.tsx} (85%) create mode 100644 packages/react/src/components/Authenticator/SetupTotp/index.ts delete mode 100644 packages/ui/src/helpers/authenticator/__tests__/context.test.ts delete mode 100644 packages/ui/src/helpers/authenticator/__tests__/listenToAuthHub.test.ts delete mode 100644 packages/ui/src/helpers/authenticator/context.ts create mode 100644 packages/ui/src/helpers/authenticator/defaultAuthHubHandler.ts rename packages/ui/src/helpers/authenticator/formFields/__tests__/{util.test.ts => utils.test.ts} (76%) rename packages/ui/src/helpers/authenticator/formFields/{util.ts => utils.ts} (72%) create mode 100644 packages/ui/src/helpers/authenticator/getRoute.ts rename packages/ui/src/{types/authenticator/stateMachine/authMachine.ts => helpers/authenticator/types.ts} (72%) delete mode 100644 packages/ui/src/machines/authenticator/__tests__/actions.test.ts rename packages/ui/src/machines/authenticator/actors/__tests__/{resetPassword.test.ts => forgotPassword.test.ts} (72%) rename packages/ui/src/machines/authenticator/{ => actors}/__tests__/signUp.test.ts (94%) rename packages/ui/src/machines/authenticator/actors/{resetPassword.ts => forgotPassword.ts} (56%) create mode 100644 packages/ui/src/machines/authenticator/actors/signUp.ts create mode 100644 packages/ui/src/machines/authenticator/actors/verifyUserAttributes.ts create mode 100644 packages/ui/src/machines/authenticator/guards.ts delete mode 100644 packages/ui/src/machines/authenticator/signUp.ts create mode 100644 packages/ui/src/machines/authenticator/types.ts delete mode 100644 packages/ui/src/types/authenticator/stateMachine/context.ts delete mode 100644 packages/ui/src/types/authenticator/stateMachine/event.ts delete mode 100644 packages/ui/src/types/authenticator/stateMachine/index.ts delete mode 100644 packages/ui/src/types/authenticator/stateMachine/state.ts create mode 100644 packages/vue/.lintstagedrc.cjs rename packages/vue/src/components/__tests__/__snapshots__/{reset-password.spec.ts.snap => forgot-password.spec.ts.snap} (98%) rename packages/vue/src/components/__tests__/{reset-password.spec.ts => forgot-password.spec.ts} (84%) rename packages/vue/src/components/{reset-password.vue => forgot-password.vue} (97%) diff --git a/packages/e2e/features/ui/components/authenticator/hub-events.feature b/canary/e2e/features/signin/hub-events.feature similarity index 68% rename from packages/e2e/features/ui/components/authenticator/hub-events.feature rename to canary/e2e/features/signin/hub-events.feature index 5458490dc65..8c49fc44ad4 100644 --- a/packages/e2e/features/ui/components/authenticator/hub-events.feature +++ b/canary/e2e/features/signin/hub-events.feature @@ -1,3 +1,4 @@ + Feature: Hub Events Authenticator listens to external Auth Hub events from 'aws-amplify'. For example, Authenticator will automatically sign out the user if it gets a @@ -6,16 +7,8 @@ Feature: Hub Events Background: Given I'm running the example "/ui/components/authenticator/hub-events" - @angular @react @vue - Scenario: Sign in with confirmed credentials then sign out - When I type my "email" with status "CONFIRMED" - Then I type my password - Then I click the "Sign in" button - Then I see "Sign out" - Then I click the "Sign out" button - Then I see "Sign in" - - @angular @react @vue + # @todo-migration maybe keep this + # @angular @react @vue Scenario: Unsuccessful token refresh logs out the user When I type my "email" with status "CONFIRMED" Then I type my password @@ -24,8 +17,8 @@ Feature: Hub Events When I dispatch "tokenRefresh_failure" event Then I see "Sign in" - # @todo-migration replace currentAuthenticatedUser mock with getCurrentUser - @skip @angular @react @vue + # @todo-migration maybe keep this + # @angular @react @vue Scenario: Successful token refresh calls currentAuthenticatedUser When I type my "email" with status "CONFIRMED" Then I type my password diff --git a/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.angular.mdx b/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.angular.mdx index b9680048c5a..a42bf7683ba 100644 --- a/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.angular.mdx +++ b/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.angular.mdx @@ -6,9 +6,9 @@ You can use `AuthenticatorService` to access `route` string that represents the - `signUp` - `confirmSignIn` - `confirmSignUp` -- `setupTOTP` +- `setupTotp` - `forceNewPassword` -- `resetPassword` +- `forgotPassword` - `confirmResetPassword` - `verifyUser` - `confirmVerifyUser` diff --git a/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.react-native.mdx b/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.react-native.mdx index 9fd019f3f8b..f402311169e 100644 --- a/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.react-native.mdx +++ b/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.react-native.mdx @@ -6,9 +6,9 @@ You can use `useAuthenticator` hook to access `route` string that represents the - `signUp` - `confirmSignIn` - `confirmSignUp` -- `setupTOTP` +- `setupTotp` - `forceNewPassword` -- `resetPassword` +- `forgotPassword` - `confirmResetPassword` - `verifyUser` - `confirmVerifyUser` diff --git a/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.react.mdx b/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.react.mdx index ed4a97192bc..890970f38b0 100644 --- a/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.react.mdx +++ b/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.react.mdx @@ -6,9 +6,9 @@ You can use `useAuthenticator` hook to access `route` string that represents the - `signUp` - `confirmSignIn` - `confirmSignUp` -- `setupTOTP` +- `setupTotp` - `forceNewPassword` -- `resetPassword` +- `forgotPassword` - `confirmResetPassword` - `verifyUser` - `confirmVerifyUser` diff --git a/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.vue.mdx b/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.vue.mdx index cd5b51c8835..3478740b64a 100644 --- a/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.vue.mdx +++ b/docs/src/pages/[platform]/connected-components/authenticator/advanced/current-route.vue.mdx @@ -6,9 +6,9 @@ You can use `useAuthenticator` composable to access `route` string that represen - `signUp` - `confirmSignIn` - `confirmSignUp` -- `setupTOTP` +- `setupTotp` - `forceNewPassword` -- `resetPassword` +- `forgotPassword` - `confirmResetPassword` - `verifyUser` - `confirmVerifyUser` diff --git a/docs/src/pages/[platform]/connected-components/authenticator/advanced/example.angular.mdx b/docs/src/pages/[platform]/connected-components/authenticator/advanced/example.angular.mdx index fa559167ce0..3bd640194e4 100644 --- a/docs/src/pages/[platform]/connected-components/authenticator/advanced/example.angular.mdx +++ b/docs/src/pages/[platform]/connected-components/authenticator/advanced/example.angular.mdx @@ -27,7 +27,7 @@ _use-authenticator.component.html_
diff --git a/docs/src/pages/[platform]/connected-components/authenticator/advanced/example.vue.mdx b/docs/src/pages/[platform]/connected-components/authenticator/advanced/example.vue.mdx index a87890deafa..89b7b557b6d 100644 --- a/docs/src/pages/[platform]/connected-components/authenticator/advanced/example.vue.mdx +++ b/docs/src/pages/[platform]/connected-components/authenticator/advanced/example.vue.mdx @@ -8,7 +8,7 @@ import aws_exports from './aws-exports'; Amplify.configure(aws_exports); -const { toResetPassword } = toRefs(useAuthenticator()); +const { toForgotPassword } = toRefs(useAuthenticator());