@aws-amplify/ui 5.8.1 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/helpers/accountSettings/utils.mjs +33 -1
- package/dist/esm/helpers/accountSettings/validator.mjs +120 -1
- package/dist/esm/helpers/authenticator/actor.mjs +20 -1
- package/dist/esm/helpers/authenticator/constants.mjs +144 -1
- package/dist/esm/helpers/authenticator/defaultAuthHubHandler.mjs +52 -0
- package/dist/esm/helpers/authenticator/facade.mjs +137 -1
- package/dist/esm/helpers/authenticator/form.mjs +43 -1
- package/dist/esm/helpers/authenticator/formFields/defaults.mjs +132 -1
- package/dist/esm/helpers/authenticator/formFields/formFields.mjs +62 -1
- package/dist/esm/helpers/authenticator/formFields/utils.mjs +35 -0
- package/dist/esm/helpers/authenticator/getRoute.mjs +47 -0
- package/dist/esm/helpers/authenticator/textUtil.mjs +112 -1
- package/dist/esm/helpers/authenticator/utils.mjs +38 -1
- package/dist/esm/helpers/utils.mjs +5 -1
- package/dist/esm/i18n/country-dial-codes.mjs +210 -1
- package/dist/esm/i18n/dictionaries/authenticator/de.mjs +87 -1
- package/dist/esm/i18n/dictionaries/authenticator/defaultTexts.mjs +83 -1
- package/dist/esm/i18n/dictionaries/authenticator/en.mjs +74 -1
- package/dist/esm/i18n/dictionaries/authenticator/es.mjs +83 -1
- package/dist/esm/i18n/dictionaries/authenticator/fr.mjs +92 -1
- package/dist/esm/i18n/dictionaries/authenticator/he.mjs +54 -1
- package/dist/esm/i18n/dictionaries/authenticator/id.mjs +96 -1
- package/dist/esm/i18n/dictionaries/authenticator/it.mjs +82 -1
- package/dist/esm/i18n/dictionaries/authenticator/ja.mjs +86 -1
- package/dist/esm/i18n/dictionaries/authenticator/kr.mjs +71 -1
- package/dist/esm/i18n/dictionaries/authenticator/nb.mjs +95 -1
- package/dist/esm/i18n/dictionaries/authenticator/nl.mjs +67 -1
- package/dist/esm/i18n/dictionaries/authenticator/pl.mjs +71 -1
- package/dist/esm/i18n/dictionaries/authenticator/pt.mjs +61 -1
- package/dist/esm/i18n/dictionaries/authenticator/ru.mjs +61 -1
- package/dist/esm/i18n/dictionaries/authenticator/sv.mjs +82 -1
- package/dist/esm/i18n/dictionaries/authenticator/tr.mjs +76 -1
- package/dist/esm/i18n/dictionaries/authenticator/ua.mjs +84 -1
- package/dist/esm/i18n/dictionaries/authenticator/zh.mjs +74 -1
- package/dist/esm/i18n/dictionaries/index.mjs +47 -1
- package/dist/esm/i18n/translations.mjs +67 -1
- package/dist/esm/index.mjs +28 -1
- package/dist/esm/machines/authenticator/actions.mjs +188 -1
- package/dist/esm/machines/authenticator/actors/forgotPassword.mjs +184 -0
- package/dist/esm/machines/authenticator/actors/signIn.mjs +328 -1
- package/dist/esm/machines/authenticator/actors/signOut.mjs +28 -1
- package/dist/esm/machines/authenticator/actors/signUp.mjs +295 -0
- package/dist/esm/machines/authenticator/actors/verifyUserAttributes.mjs +106 -0
- package/dist/esm/machines/authenticator/defaultServices.mjs +102 -1
- package/dist/esm/machines/authenticator/guards.mjs +70 -0
- package/dist/esm/machines/authenticator/index.mjs +368 -1
- package/dist/esm/machines/authenticator/utils.mjs +71 -0
- package/dist/esm/theme/breakpoints.mjs +14 -1
- package/dist/esm/theme/createTheme.mjs +156 -1
- package/dist/esm/theme/defaultDarkModeOverride.mjs +128 -1
- package/dist/esm/theme/defaultTheme.mjs +10 -1
- package/dist/esm/theme/tokens/borderWidths.mjs +7 -1
- package/dist/esm/theme/tokens/colors.mjs +166 -1
- package/dist/esm/theme/tokens/components/accordion.mjs +47 -0
- package/dist/esm/theme/tokens/components/alert.mjs +35 -1
- package/dist/esm/theme/tokens/components/authenticator.mjs +39 -1
- package/dist/esm/theme/tokens/components/autocomplete.mjs +42 -1
- package/dist/esm/theme/tokens/components/badge.mjs +44 -1
- package/dist/esm/theme/tokens/components/breadcrumbs.mjs +34 -1
- package/dist/esm/theme/tokens/components/button.mjs +685 -1
- package/dist/esm/theme/tokens/components/card.mjs +27 -1
- package/dist/esm/theme/tokens/components/checkbox.mjs +87 -1
- package/dist/esm/theme/tokens/components/checkboxField.mjs +8 -1
- package/dist/esm/theme/tokens/components/collection.mjs +72 -1
- package/dist/esm/theme/tokens/components/copy.mjs +18 -1
- package/dist/esm/theme/tokens/components/dialCodeSelect.mjs +7 -1
- package/dist/esm/theme/tokens/components/divider.mjs +22 -1
- package/dist/esm/theme/tokens/components/dropZone.mjs +46 -1
- package/dist/esm/theme/tokens/components/field.mjs +20 -1
- package/dist/esm/theme/tokens/components/fieldControl.mjs +131 -1
- package/dist/esm/theme/tokens/components/fieldGroup.mjs +11 -1
- package/dist/esm/theme/tokens/components/fieldMessages.mjs +13 -1
- package/dist/esm/theme/tokens/components/fieldset.mjs +40 -1
- package/dist/esm/theme/tokens/components/flex.mjs +9 -1
- package/dist/esm/theme/tokens/components/heading.mjs +30 -1
- package/dist/esm/theme/tokens/components/highlightMatch.mjs +7 -1
- package/dist/esm/theme/tokens/components/icon.mjs +6 -1
- package/dist/esm/theme/tokens/components/image.mjs +8 -1
- package/dist/esm/theme/tokens/components/inAppMessaging.mjs +23 -1
- package/dist/esm/theme/tokens/components/index.mjs +111 -1
- package/dist/esm/theme/tokens/components/input.mjs +12 -1
- package/dist/esm/theme/tokens/components/link.mjs +9 -1
- package/dist/esm/theme/tokens/components/liveness.mjs +7 -1
- package/dist/esm/theme/tokens/components/loader.mjs +42 -1
- package/dist/esm/theme/tokens/components/menu.mjs +27 -1
- package/dist/esm/theme/tokens/components/message.mjs +102 -1
- package/dist/esm/theme/tokens/components/pagination.mjs +40 -1
- package/dist/esm/theme/tokens/components/passwordField.mjs +38 -1
- package/dist/esm/theme/tokens/components/phoneNumberField.mjs +10 -1
- package/dist/esm/theme/tokens/components/placeholder.mjs +18 -1
- package/dist/esm/theme/tokens/components/radio.mjs +67 -1
- package/dist/esm/theme/tokens/components/radioGroup.mjs +19 -1
- package/dist/esm/theme/tokens/components/rating.mjs +9 -1
- package/dist/esm/theme/tokens/components/searchField.mjs +39 -1
- package/dist/esm/theme/tokens/components/select.mjs +63 -1
- package/dist/esm/theme/tokens/components/selectField.mjs +16 -1
- package/dist/esm/theme/tokens/components/sliderField.mjs +70 -1
- package/dist/esm/theme/tokens/components/stepperField.mjs +33 -1
- package/dist/esm/theme/tokens/components/storagemanager.mjs +97 -1
- package/dist/esm/theme/tokens/components/switchField.mjs +61 -1
- package/dist/esm/theme/tokens/components/table.mjs +105 -1
- package/dist/esm/theme/tokens/components/tabs.mjs +59 -1
- package/dist/esm/theme/tokens/components/text.mjs +28 -1
- package/dist/esm/theme/tokens/components/textAreaField.mjs +11 -1
- package/dist/esm/theme/tokens/components/textField.mjs +12 -1
- package/dist/esm/theme/tokens/components/toggleButton.mjs +96 -1
- package/dist/esm/theme/tokens/components/toggleButtonGroup.mjs +7 -1
- package/dist/esm/theme/tokens/fontSizes.mjs +14 -1
- package/dist/esm/theme/tokens/fontWeights.mjs +13 -1
- package/dist/esm/theme/tokens/fonts.mjs +19 -1
- package/dist/esm/theme/tokens/index.mjs +65 -1
- package/dist/esm/theme/tokens/lineHeights.mjs +7 -1
- package/dist/esm/theme/tokens/opacities.mjs +15 -1
- package/dist/esm/theme/tokens/outlineOffsets.mjs +7 -1
- package/dist/esm/theme/tokens/outlineWidths.mjs +7 -1
- package/dist/esm/theme/tokens/radii.mjs +11 -1
- package/dist/esm/theme/tokens/shadows.mjs +28 -1
- package/dist/esm/theme/tokens/space.mjs +29 -1
- package/dist/esm/theme/tokens/time.mjs +7 -1
- package/dist/esm/theme/tokens/transforms.mjs +10 -1
- package/dist/esm/theme/utils.mjs +81 -1
- package/dist/esm/types/authenticator/attributes.mjs +41 -1
- package/dist/esm/types/authenticator/user.mjs +18 -1
- package/dist/esm/types/authenticator/utils.mjs +5 -1
- package/dist/esm/types/primitives/componentClassName.mjs +164 -1
- package/dist/esm/utils/classNames.mjs +39 -0
- package/dist/esm/utils/setUserAgent/constants.mjs +43 -0
- package/dist/esm/utils/setUserAgent/setUserAgent.mjs +65 -0
- package/dist/esm/utils/utils.mjs +227 -0
- package/dist/esm/validators/index.mjs +19 -1
- package/dist/index.js +8396 -1
- package/dist/styles/StorageManager.css +138 -0
- package/dist/styles/StorageManager.layer.css +140 -0
- package/dist/styles/_fieldControl.css +0 -0
- package/dist/styles/_fieldControl.layer.css +3 -0
- package/dist/styles/accordion.css +64 -0
- package/dist/styles/accordion.layer.css +66 -0
- package/dist/styles/alert.css +44 -0
- package/dist/styles/alert.layer.css +46 -0
- package/dist/styles/authenticator.css +72 -0
- package/dist/styles/authenticator.layer.css +74 -0
- package/dist/styles/autocomplete.css +48 -0
- package/dist/styles/autocomplete.layer.css +50 -0
- package/dist/styles/badge.css +35 -0
- package/dist/styles/badge.layer.css +37 -0
- package/dist/styles/base.css +1491 -0
- package/dist/styles/base.layer.css +1493 -0
- package/dist/styles/breadcrumbs.css +40 -0
- package/dist/styles/breadcrumbs.layer.css +42 -0
- package/dist/styles/button.css +1122 -0
- package/dist/styles/button.layer.css +1124 -0
- package/dist/styles/card.css +26 -0
- package/dist/styles/card.layer.css +28 -0
- package/dist/styles/checkbox.css +95 -0
- package/dist/styles/checkbox.layer.css +97 -0
- package/dist/styles/checkboxField.css +6 -0
- package/dist/styles/checkboxField.layer.css +8 -0
- package/dist/styles/collection.css +70 -0
- package/dist/styles/collection.layer.css +72 -0
- package/dist/styles/copy.css +27 -0
- package/dist/styles/copy.layer.css +29 -0
- package/dist/styles/dialCodeSelect.css +3 -0
- package/dist/styles/dialCodeSelect.layer.css +5 -0
- package/dist/styles/divider.css +47 -0
- package/dist/styles/divider.layer.css +49 -0
- package/dist/styles/dropZone.css +45 -0
- package/dist/styles/dropZone.layer.css +47 -0
- package/dist/styles/field.css +17 -0
- package/dist/styles/field.layer.css +19 -0
- package/dist/styles/fieldGroup.css +130 -0
- package/dist/styles/fieldGroup.layer.css +132 -0
- package/dist/styles/fieldMessages.css +10 -0
- package/dist/styles/fieldMessages.layer.css +12 -0
- package/dist/styles/fieldModifiers.css +15 -0
- package/dist/styles/fieldModifiers.layer.css +17 -0
- package/dist/styles/fieldset.css +37 -0
- package/dist/styles/fieldset.layer.css +39 -0
- package/dist/styles/flex.css +8 -0
- package/dist/styles/flex.layer.css +10 -0
- package/dist/styles/grid.css +3 -0
- package/dist/styles/grid.layer.css +5 -0
- package/dist/styles/heading.css +40 -0
- package/dist/styles/heading.layer.css +42 -0
- package/dist/styles/highlightMatch.css +3 -0
- package/dist/styles/highlightMatch.layer.css +5 -0
- package/dist/styles/icon.css +14 -0
- package/dist/styles/icon.layer.css +16 -0
- package/dist/styles/image.css +9 -0
- package/dist/styles/image.layer.css +11 -0
- package/dist/styles/inAppMessaging.css +179 -0
- package/dist/styles/inAppMessaging.layer.css +181 -0
- package/dist/styles/input.css +83 -0
- package/dist/styles/input.layer.css +85 -0
- package/dist/styles/link.css +26 -0
- package/dist/styles/link.layer.css +28 -0
- package/dist/styles/liveness.css +423 -0
- package/dist/styles/liveness.layer.css +425 -0
- package/dist/styles/loader.css +108 -0
- package/dist/styles/loader.layer.css +110 -0
- package/dist/styles/menu.css +54 -0
- package/dist/styles/menu.layer.css +56 -0
- package/dist/styles/message.css +111 -0
- package/dist/styles/message.layer.css +113 -0
- package/dist/styles/pagination.css +41 -0
- package/dist/styles/pagination.layer.css +43 -0
- package/dist/styles/passwordField.css +49 -0
- package/dist/styles/passwordField.layer.css +51 -0
- package/dist/styles/phoneNumberField.css +30 -0
- package/dist/styles/phoneNumberField.layer.css +32 -0
- package/dist/styles/placeholder.css +31 -0
- package/dist/styles/placeholder.layer.css +33 -0
- package/dist/styles/radio.css +82 -0
- package/dist/styles/radio.layer.css +84 -0
- package/dist/styles/radioGroupField.css +25 -0
- package/dist/styles/radioGroupField.layer.css +27 -0
- package/dist/styles/radiogroup.css +5 -0
- package/dist/styles/radiogroup.layer.css +7 -0
- package/dist/styles/rating.css +33 -0
- package/dist/styles/rating.layer.css +35 -0
- package/dist/styles/reset.css +76 -0
- package/dist/styles/reset.layer.css +78 -0
- package/dist/styles/scrollView.css +4 -0
- package/dist/styles/scrollView.layer.css +6 -0
- package/dist/styles/searchField.css +29 -0
- package/dist/styles/searchField.layer.css +31 -0
- package/dist/styles/select.css +128 -0
- package/dist/styles/select.layer.css +130 -0
- package/dist/styles/selectField.css +18 -0
- package/dist/styles/selectField.layer.css +20 -0
- package/dist/styles/sliderField.css +143 -0
- package/dist/styles/sliderField.layer.css +145 -0
- package/dist/styles/stepperField.css +77 -0
- package/dist/styles/stepperField.layer.css +79 -0
- package/dist/styles/switchField.css +76 -0
- package/dist/styles/switchField.layer.css +78 -0
- package/dist/styles/table.css +146 -0
- package/dist/styles/table.layer.css +148 -0
- package/dist/styles/tabs.css +87 -0
- package/dist/styles/tabs.layer.css +89 -0
- package/dist/styles/text.css +40 -0
- package/dist/styles/text.layer.css +42 -0
- package/dist/styles/textArea.css +71 -0
- package/dist/styles/textArea.layer.css +73 -0
- package/dist/styles/textAreaField.css +12 -0
- package/dist/styles/textAreaField.layer.css +14 -0
- package/dist/styles/textField.css +14 -0
- package/dist/styles/textField.layer.css +16 -0
- package/dist/styles/toggleButton.css +280 -0
- package/dist/styles/toggleButton.layer.css +282 -0
- package/dist/styles/toggleButtonGroup.css +31 -0
- package/dist/styles/toggleButtonGroup.layer.css +33 -0
- package/dist/styles/visuallyHidden.css +12 -0
- package/dist/styles/visuallyHidden.layer.css +14 -0
- package/dist/styles.css +343 -680
- package/dist/styles.layer.css +6164 -0
- package/dist/theme.css +93 -156
- package/dist/types/helpers/accountSettings/utils.d.ts +1 -3
- package/dist/types/helpers/authenticator/actor.d.ts +1 -1
- package/dist/types/helpers/authenticator/constants.d.ts +5 -0
- package/dist/types/helpers/authenticator/defaultAuthHubHandler.d.ts +15 -0
- package/dist/types/helpers/authenticator/facade.d.ts +35 -6
- package/dist/types/helpers/authenticator/formFields/defaults.d.ts +3 -1
- package/dist/types/helpers/authenticator/formFields/formFields.d.ts +2 -1
- package/dist/types/helpers/authenticator/formFields/index.d.ts +1 -1
- package/dist/types/helpers/authenticator/formFields/{util.d.ts → utils.d.ts} +2 -0
- package/dist/types/helpers/authenticator/getRoute.d.ts +2 -0
- package/dist/types/helpers/authenticator/index.d.ts +2 -1
- package/dist/types/helpers/authenticator/textUtil.d.ts +8 -7
- package/dist/types/{types/authenticator/stateMachine/authMachine.d.ts → helpers/authenticator/types.d.ts} +5 -5
- package/dist/types/helpers/authenticator/utils.d.ts +0 -25
- package/dist/types/helpers/index.d.ts +0 -1
- package/dist/types/helpers/utils.d.ts +2 -2
- package/dist/types/i18n/translations.d.ts +2 -3
- package/dist/types/machines/authenticator/actions.d.ts +4 -62
- package/dist/types/machines/authenticator/actors/{resetPassword.d.ts → forgotPassword.d.ts} +3 -3
- package/dist/types/machines/authenticator/actors/index.d.ts +3 -1
- package/dist/types/machines/authenticator/actors/signIn.d.ts +3 -3
- package/dist/types/machines/authenticator/actors/signOut.d.ts +2 -2
- package/dist/types/machines/authenticator/{signUp.d.ts → actors/signUp.d.ts} +3 -3
- package/dist/types/machines/authenticator/actors/verifyUserAttributes.d.ts +5 -0
- package/dist/types/machines/authenticator/defaultServices.d.ts +208 -28
- package/dist/types/machines/authenticator/getAuthenticatorConfig.d.ts +14 -0
- package/dist/types/machines/authenticator/guards.d.ts +4 -0
- package/dist/types/machines/authenticator/index.d.ts +4 -2
- package/dist/types/machines/authenticator/types.d.ts +125 -0
- package/dist/types/machines/authenticator/utils.d.ts +7 -0
- package/dist/types/machines/index.d.ts +1 -0
- package/dist/types/theme/tokens/borderWidths.d.ts +2 -2
- package/dist/types/theme/tokens/colors.d.ts +7 -9
- package/dist/types/theme/tokens/components/accordion.d.ts +12 -0
- package/dist/types/theme/tokens/components/index.d.ts +2 -4
- package/dist/types/theme/tokens/components/radioGroup.d.ts +1 -1
- package/dist/types/theme/tokens/components/storagemanager.d.ts +18 -3
- package/dist/types/theme/tokens/components/tabs.d.ts +4 -3
- package/dist/types/theme/tokens/fontSizes.d.ts +2 -2
- package/dist/types/theme/tokens/fontWeights.d.ts +2 -2
- package/dist/types/theme/tokens/fonts.d.ts +2 -2
- package/dist/types/theme/tokens/lineHeights.d.ts +2 -2
- package/dist/types/theme/tokens/opacities.d.ts +2 -2
- package/dist/types/theme/tokens/outlineOffsets.d.ts +2 -2
- package/dist/types/theme/tokens/outlineWidths.d.ts +2 -2
- package/dist/types/theme/tokens/radii.d.ts +2 -2
- package/dist/types/theme/tokens/shadows.d.ts +2 -2
- package/dist/types/theme/tokens/space.d.ts +2 -2
- package/dist/types/theme/tokens/time.d.ts +2 -2
- package/dist/types/theme/tokens/types/designToken.d.ts +12 -6
- package/dist/types/theme/types.d.ts +5 -1
- package/dist/types/types/authenticator/attributes.d.ts +10 -4
- package/dist/types/types/authenticator/form.d.ts +7 -6
- package/dist/types/types/authenticator/index.d.ts +0 -1
- package/dist/types/types/authenticator/user.d.ts +3 -29
- package/dist/types/types/authenticator/validator.d.ts +2 -2
- package/dist/types/types/displayText.d.ts +84 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/primitives/componentClassName.d.ts +162 -180
- package/dist/types/types/util.d.ts +0 -5
- package/dist/types/utils/classNames.d.ts +4 -0
- package/dist/types/utils/index.d.ts +3 -135
- package/dist/types/utils/setUserAgent/constants.d.ts +7 -0
- package/dist/types/utils/setUserAgent/index.d.ts +1 -0
- package/dist/types/utils/setUserAgent/setUserAgent.d.ts +19 -0
- package/dist/types/utils/utils.d.ts +147 -0
- package/dist/types/validators/index.d.ts +2 -2
- package/package.json +5 -19
- package/dist/esm/helpers/authenticator/context.mjs +0 -1
- package/dist/esm/helpers/authenticator/formFields/util.mjs +0 -1
- package/dist/esm/helpers/storage/fileUploader/utils/uploader.mjs +0 -1
- package/dist/esm/machines/authenticator/actors/resetPassword.mjs +0 -1
- package/dist/esm/machines/authenticator/signUp.mjs +0 -1
- package/dist/esm/theme/tokens/components/expander.mjs +0 -1
- package/dist/esm/theme/tokens/components/fileUploader.mjs +0 -1
- package/dist/esm/utils/index.mjs +0 -1
- package/dist/types/helpers/authenticator/context.d.ts +0 -13
- package/dist/types/helpers/storage/fileUploader/index.d.ts +0 -1
- package/dist/types/helpers/storage/fileUploader/utils/index.d.ts +0 -1
- package/dist/types/helpers/storage/fileUploader/utils/uploader.d.ts +0 -28
- package/dist/types/helpers/storage/index.d.ts +0 -1
- package/dist/types/theme/tokens/components/expander.d.ts +0 -22
- package/dist/types/theme/tokens/components/fileUploader.d.ts +0 -23
- package/dist/types/types/authenticator/stateMachine/context.d.ts +0 -109
- package/dist/types/types/authenticator/stateMachine/event.d.ts +0 -17
- package/dist/types/types/authenticator/stateMachine/index.d.ts +0 -4
- package/dist/types/types/authenticator/stateMachine/state.d.ts +0 -10
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SocialProvider } from '../../types';
|
|
2
|
+
import { ChallengeName, V5CodeDeliveryDetails } from '../../machines/authenticator/types';
|
|
2
3
|
import { AuthenticatorRoute } from './facade';
|
|
3
4
|
export declare const authenticatorTextUtil: {
|
|
4
5
|
/** Shared */
|
|
@@ -28,15 +29,15 @@ export declare const authenticatorTextUtil: {
|
|
|
28
29
|
readonly getCreatingAccountText: () => string;
|
|
29
30
|
readonly getCreateAccountText: () => string;
|
|
30
31
|
/** ConfirmSignUp */
|
|
31
|
-
readonly getDeliveryMessageText: (codeDeliveryDetails:
|
|
32
|
-
readonly getDeliveryMethodText: (codeDeliveryDetails:
|
|
32
|
+
readonly getDeliveryMessageText: (codeDeliveryDetails: V5CodeDeliveryDetails) => string;
|
|
33
|
+
readonly getDeliveryMethodText: (codeDeliveryDetails: V5CodeDeliveryDetails) => string;
|
|
33
34
|
/** ConfirmSignIn */
|
|
34
|
-
readonly getChallengeText: (challengeName?:
|
|
35
|
+
readonly getChallengeText: (challengeName?: ChallengeName) => string;
|
|
35
36
|
/** ResetPassword */
|
|
36
37
|
readonly getResetYourPasswordText: () => string;
|
|
37
|
-
/**
|
|
38
|
-
readonly
|
|
39
|
-
readonly
|
|
38
|
+
/** SetupTotp */
|
|
39
|
+
readonly getSetupTotpText: () => string;
|
|
40
|
+
readonly getSetupTotpInstructionsText: () => string;
|
|
40
41
|
readonly getCopiedText: () => string;
|
|
41
42
|
/** FederatedSignIn */
|
|
42
43
|
readonly getSignInWithFederationText: (route: AuthenticatorRoute, provider: SocialProvider) => string;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* authenticator machine and its intepreter.
|
|
4
4
|
*/
|
|
5
5
|
import { Interpreter } from 'xstate';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { AuthUser } from 'aws-amplify/auth';
|
|
7
|
+
import { HubCapsule } from 'aws-amplify/utils';
|
|
8
|
+
import { AuthContext, AuthEvent } from '../../machines/authenticator/types';
|
|
9
9
|
/**
|
|
10
10
|
* Intefrace for `authMachine` machine interpreter
|
|
11
11
|
*
|
|
@@ -20,7 +20,7 @@ export type AuthMachineSend = AuthInterpreter['send'];
|
|
|
20
20
|
* Handles Amplify JS Auth hub events, by forwarding hub events as appropriate
|
|
21
21
|
* xstate events.
|
|
22
22
|
*/
|
|
23
|
-
export type AuthMachineHubHandler = (data: HubCapsule, service: AuthInterpreter, options?: {
|
|
24
|
-
onSignIn?: () => void;
|
|
23
|
+
export type AuthMachineHubHandler = (data: HubCapsule<any, any>, service: AuthInterpreter, options?: {
|
|
24
|
+
onSignIn?: (user: AuthUser) => void;
|
|
25
25
|
onSignOut?: () => void;
|
|
26
26
|
}) => Promise<void>;
|
|
@@ -1,31 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file contains general helpers that state machine or authenticator
|
|
3
|
-
* implementations can use.
|
|
4
|
-
*/
|
|
5
|
-
import { AuthInterpreter, AuthMachineHubHandler } from '../../types';
|
|
6
|
-
type ConfigureOptions = {
|
|
7
|
-
packageName: string;
|
|
8
|
-
version: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const configureComponent: ({ packageName, version, }: ConfigureOptions) => void;
|
|
11
1
|
export declare const censorAllButFirstAndLast: (value: string) => string;
|
|
12
2
|
export declare const censorPhoneNumber: (val: string) => string;
|
|
13
|
-
/**
|
|
14
|
-
* Handles Amplify JS Auth hub events, by forwarding hub events as appropriate
|
|
15
|
-
* xstate events.
|
|
16
|
-
*/
|
|
17
|
-
export declare const defaultAuthHubHandler: AuthMachineHubHandler;
|
|
18
|
-
/**
|
|
19
|
-
* Listens to external auth Hub events and sends corresponding event to
|
|
20
|
-
* the `authService` of interest
|
|
21
|
-
*
|
|
22
|
-
* @param send - `send` function associated with the `authService` of interest
|
|
23
|
-
*
|
|
24
|
-
* @returns function that unsubscribes to the hub evenmt
|
|
25
|
-
*/
|
|
26
|
-
export declare const listenToAuthHub: (service: AuthInterpreter, handler?: AuthMachineHubHandler) => () => void;
|
|
27
3
|
export declare const hasSpecialChars: (password: string) => boolean;
|
|
28
4
|
export declare const getTotpCodeURL: (issuer: string, username: string, secret: string) => string;
|
|
29
5
|
export declare function trimValues<T extends Record<string, string>>(values: T, ...ignored: string[]): T;
|
|
30
6
|
export declare const isValidEmail: (value: string | undefined) => boolean;
|
|
31
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Logger } from 'aws-amplify';
|
|
2
|
-
type LoggerCategory = 'Auth' | 'Geo' | 'Notifications' | 'Storage';
|
|
1
|
+
import { ConsoleLogger as Logger } from 'aws-amplify/utils';
|
|
2
|
+
type LoggerCategory = 'Auth' | 'AccountSettings' | 'Geo' | 'Notifications' | 'Storage';
|
|
3
3
|
export declare const getLogger: (category: LoggerCategory) => Logger;
|
|
4
4
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { NoInfer } from '../types';
|
|
2
1
|
/**
|
|
3
2
|
* Contains translatable strings that authenticator provides by default. Customers
|
|
4
3
|
* can use this to add custom vocabularies:
|
|
@@ -91,7 +90,7 @@ export declare const DefaultTexts: {
|
|
|
91
90
|
readonly WE_TEXTED: string;
|
|
92
91
|
readonly WEBSITE: string;
|
|
93
92
|
};
|
|
94
|
-
export type Phrase = typeof DefaultTexts[keyof typeof DefaultTexts];
|
|
93
|
+
export type Phrase = (typeof DefaultTexts)[keyof typeof DefaultTexts];
|
|
95
94
|
/**
|
|
96
95
|
* TODO: Translation keys for dictionaries can be inferred from DefaultTexts
|
|
97
96
|
* by typing it to Partial<Record<Phrase, string>>.
|
|
@@ -108,7 +107,7 @@ export type Dict = Record<string, string>;
|
|
|
108
107
|
*
|
|
109
108
|
* You can also use translate<string> to handle custom strings or dynamic content.
|
|
110
109
|
*/
|
|
111
|
-
export declare function translate<T
|
|
110
|
+
export declare function translate<T extends string>(phrase: T): string;
|
|
112
111
|
/**
|
|
113
112
|
* Whether I18n has a translation entry for given phrase
|
|
114
113
|
*/
|
|
@@ -1,62 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
* Actions in Xstate take in two arguments - a `context` and
|
|
7
|
-
* an `event`.
|
|
8
|
-
*
|
|
9
|
-
* When writing reusable actions in a separate file for Xstate,
|
|
10
|
-
* you cannot specify the type for both the `context` and the `event`.
|
|
11
|
-
* The bug has been around for 2 years with seemingly no resolution
|
|
12
|
-
* in sight.
|
|
13
|
-
*
|
|
14
|
-
* TypeScript apparently has trouble inferring Xstate properly.
|
|
15
|
-
* So, when writing actions, only specify the type for either `context`
|
|
16
|
-
* or `event` - but not both.
|
|
17
|
-
*
|
|
18
|
-
* https://xstate.js.org/docs/guides/typescript.html#assign-action-behaving-strangely
|
|
19
|
-
*
|
|
20
|
-
* Each of the actions NEEDS at least the `context` argument in the
|
|
21
|
-
* `assign` body - even if it is unused. This is another known bug in
|
|
22
|
-
* how TypeScript integrate with Xstate.
|
|
23
|
-
*/
|
|
24
|
-
/**
|
|
25
|
-
* "clear" actions
|
|
26
|
-
*/
|
|
27
|
-
export declare const clearAttributeToVerify: import("xstate").AssignAction<unknown, import("xstate").EventObject, import("xstate").EventObject>;
|
|
28
|
-
export declare const clearChallengeName: import("xstate").AssignAction<unknown, import("xstate").EventObject, import("xstate").EventObject>;
|
|
29
|
-
export declare const clearRequiredAttributes: import("xstate").AssignAction<unknown, import("xstate").EventObject, import("xstate").EventObject>;
|
|
30
|
-
export declare const clearError: import("xstate").AssignAction<unknown, import("xstate").EventObject, import("xstate").EventObject>;
|
|
31
|
-
export declare const clearFormValues: import("xstate").AssignAction<unknown, import("xstate").EventObject, import("xstate").EventObject>;
|
|
32
|
-
export declare const clearTouched: import("xstate").AssignAction<unknown, import("xstate").EventObject, import("xstate").EventObject>;
|
|
33
|
-
export declare const clearUnverifiedContactMethods: import("xstate").AssignAction<unknown, import("xstate").EventObject, import("xstate").EventObject>;
|
|
34
|
-
export declare const clearUsername: import("xstate").AssignAction<unknown, import("xstate").EventObject, import("xstate").EventObject>;
|
|
35
|
-
export declare const clearValidationError: import("xstate").AssignAction<unknown, import("xstate").EventObject, import("xstate").EventObject>;
|
|
36
|
-
/**
|
|
37
|
-
* "set" actions
|
|
38
|
-
*/
|
|
39
|
-
export declare const setTotpSecretCode: import("xstate").AssignAction<unknown, AuthEvent, AuthEvent>;
|
|
40
|
-
export declare const setChallengeName: import("xstate").AssignAction<unknown, AuthEvent, AuthEvent>;
|
|
41
|
-
export declare const setRequiredAttributes: import("xstate").AssignAction<unknown, AuthEvent, AuthEvent>;
|
|
42
|
-
export declare const setConfirmResetPasswordIntent: import("xstate").AssignAction<unknown, import("xstate").EventObject, import("xstate").EventObject>;
|
|
43
|
-
export declare const setConfirmSignUpIntent: import("xstate").AssignAction<unknown, import("xstate").EventObject, import("xstate").EventObject>;
|
|
44
|
-
export declare const setCredentials: import("xstate").AssignAction<SignInContext | SignUpContext, import("xstate").EventObject, import("xstate").EventObject>;
|
|
45
|
-
export declare const setFieldErrors: import("xstate").AssignAction<unknown, AuthEvent, AuthEvent>;
|
|
46
|
-
export declare const setRemoteError: import("xstate").AssignAction<unknown, AuthEvent, AuthEvent>;
|
|
47
|
-
export declare const setUnverifiedContactMethods: import("xstate").AssignAction<unknown, AuthEvent, AuthEvent>;
|
|
48
|
-
export declare const setUser: import("xstate").AssignAction<unknown, AuthEvent, AuthEvent>;
|
|
49
|
-
export declare const setUsername: import("xstate").AssignAction<ActorContextWithForms, import("xstate").EventObject, import("xstate").EventObject>;
|
|
50
|
-
export declare const setCodeDeliveryDetails: import("xstate").AssignAction<unknown, AuthEvent, AuthEvent>;
|
|
51
|
-
export declare const setUsernameAuthAttributes: import("xstate").AssignAction<ActorContextWithForms, import("xstate").EventObject, import("xstate").EventObject>;
|
|
52
|
-
export declare const handleInput: import("xstate").AssignAction<unknown, AuthEvent, AuthEvent>;
|
|
53
|
-
export declare const handleSubmit: import("xstate").AssignAction<unknown, AuthEvent, AuthEvent>;
|
|
54
|
-
export declare const handleBlur: import("xstate").AssignAction<unknown, AuthEvent, AuthEvent>;
|
|
55
|
-
export declare const resendCode: (context: any) => Promise<any>;
|
|
56
|
-
/**
|
|
57
|
-
* This action occurs on the entry to a state where a form submit action
|
|
58
|
-
* occurs. It combines the phone_number and country_code form values, parses
|
|
59
|
-
* the result, and updates the form values with the full phone number which is
|
|
60
|
-
* the required format by Cognito for form submission.
|
|
61
|
-
*/
|
|
62
|
-
export declare const parsePhoneNumber: import("xstate").AssignAction<SignInContext | SignUpContext, import("xstate").EventObject, import("xstate").EventObject>;
|
|
1
|
+
import { MachineOptions } from 'xstate';
|
|
2
|
+
import { AuthEvent, AuthActorContext } from './types';
|
|
3
|
+
declare const ACTIONS: MachineOptions<AuthActorContext, AuthEvent>['actions'];
|
|
4
|
+
export default ACTIONS;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AuthEvent, ResetPasswordContext } from '../../../types';
|
|
2
1
|
import { defaultServices } from '../defaultServices';
|
|
3
|
-
|
|
2
|
+
import { AuthEvent, ResetPasswordContext } from '../types';
|
|
3
|
+
export type ForgotPasswordMachineOptions = {
|
|
4
4
|
services?: Partial<typeof defaultServices>;
|
|
5
5
|
};
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function forgotPasswordActor({ services, }: ForgotPasswordMachineOptions): import("xstate").StateMachine<ResetPasswordContext, any, AuthEvent, {
|
|
7
7
|
value: any;
|
|
8
8
|
context: ResetPasswordContext;
|
|
9
9
|
}, import("xstate").BaseActionObject, import("xstate").ServiceMap, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, AuthEvent, import("xstate").BaseActionObject, import("xstate").ServiceMap>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AuthEvent, SignInContext } from '../../../types';
|
|
2
1
|
import { defaultServices } from '../defaultServices';
|
|
3
|
-
|
|
2
|
+
import { AuthEvent, SignInContext } from '../types';
|
|
3
|
+
export interface SignInMachineOptions {
|
|
4
4
|
services?: Partial<typeof defaultServices>;
|
|
5
|
-
}
|
|
5
|
+
}
|
|
6
6
|
export declare function signInActor({ services }: SignInMachineOptions): import("xstate").StateMachine<SignInContext, any, AuthEvent, {
|
|
7
7
|
value: any;
|
|
8
8
|
context: SignInContext;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuthEvent, SignOutContext } from '
|
|
2
|
-
export declare const signOutActor: import("xstate").StateMachine<SignOutContext, any, AuthEvent, {
|
|
1
|
+
import { AuthEvent, SignOutContext } from '../types';
|
|
2
|
+
export declare const signOutActor: () => import("xstate").StateMachine<SignOutContext, any, AuthEvent, {
|
|
3
3
|
value: any;
|
|
4
4
|
context: SignOutContext;
|
|
5
5
|
}, import("xstate").BaseActionObject, import("xstate").ServiceMap, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, AuthEvent, import("xstate").BaseActionObject, import("xstate").ServiceMap>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AuthEvent, SignUpContext } from '
|
|
2
|
-
import { defaultServices } from '
|
|
1
|
+
import { AuthEvent, SignUpContext } from '../types';
|
|
2
|
+
import { defaultServices } from '../defaultServices';
|
|
3
3
|
export type SignUpMachineOptions = {
|
|
4
4
|
services?: Partial<typeof defaultServices>;
|
|
5
5
|
};
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function signUpActor({ services }: SignUpMachineOptions): import("xstate").StateMachine<SignUpContext, any, AuthEvent, {
|
|
7
7
|
value: any;
|
|
8
8
|
context: SignUpContext;
|
|
9
9
|
}, import("xstate").BaseActionObject, import("xstate").ServiceMap, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, AuthEvent, import("xstate").BaseActionObject, import("xstate").ServiceMap>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AuthEvent, VerifyUserContext } from '../types';
|
|
2
|
+
export declare function verifyUserAttributesActor(): import("xstate").StateMachine<VerifyUserContext, any, AuthEvent, {
|
|
3
|
+
value: any;
|
|
4
|
+
context: VerifyUserContext;
|
|
5
|
+
}, import("xstate").BaseActionObject, import("xstate").ServiceMap, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, AuthEvent, import("xstate").BaseActionObject, import("xstate").ServiceMap>>;
|
|
@@ -1,30 +1,210 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import { confirmResetPassword, confirmSignIn, confirmSignUp, resetPassword, signIn, signUp } from 'aws-amplify/auth';
|
|
2
|
+
import { AuthFormData, AuthTouchData, PasswordSettings, SignUpAttribute, SocialProvider, ValidatorResult } from '../../types';
|
|
3
3
|
export declare const defaultServices: {
|
|
4
|
-
getAmplifyConfig(): Promise<{
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
4
|
+
getAmplifyConfig(): Promise<{
|
|
5
|
+
loginMechanisms: ("email" | "phone_number" | "username")[];
|
|
6
|
+
signUpAttributes: SignUpAttribute[];
|
|
7
|
+
socialProviders: SocialProvider[];
|
|
8
|
+
identityPoolId: string;
|
|
9
|
+
allowGuestAccess?: boolean;
|
|
10
|
+
userPoolClientId?: never;
|
|
11
|
+
userPoolId?: never;
|
|
12
|
+
userPoolEndpoint?: never;
|
|
13
|
+
loginWith?: never;
|
|
14
|
+
signUpVerificationMethod?: never;
|
|
15
|
+
userAttributes?: never;
|
|
16
|
+
mfa?: never;
|
|
17
|
+
passwordFormat?: never;
|
|
18
|
+
} | {
|
|
19
|
+
loginMechanisms: ("email" | "phone_number" | "username")[];
|
|
20
|
+
signUpAttributes: SignUpAttribute[];
|
|
21
|
+
socialProviders: SocialProvider[];
|
|
22
|
+
userPoolClientId: string;
|
|
23
|
+
userPoolId: string;
|
|
24
|
+
userPoolEndpoint?: string;
|
|
25
|
+
signUpVerificationMethod?: "link" | "code";
|
|
26
|
+
loginWith?: {
|
|
27
|
+
oauth?: import("@aws-amplify/core").OAuthConfig;
|
|
28
|
+
username?: boolean;
|
|
29
|
+
email?: boolean;
|
|
30
|
+
phone?: boolean;
|
|
31
|
+
};
|
|
32
|
+
userAttributes?: Partial<Record<import("@aws-amplify/core/internals/utils").AuthStandardAttributeKey, {
|
|
33
|
+
required: boolean;
|
|
34
|
+
}>>;
|
|
35
|
+
mfa?: {
|
|
36
|
+
status?: "on" | "optional" | "off";
|
|
37
|
+
totpEnabled?: boolean;
|
|
38
|
+
smsEnabled?: boolean;
|
|
39
|
+
};
|
|
40
|
+
passwordFormat?: {
|
|
41
|
+
minLength?: number;
|
|
42
|
+
requireLowercase?: boolean;
|
|
43
|
+
requireUppercase?: boolean;
|
|
44
|
+
requireNumbers?: boolean;
|
|
45
|
+
requireSpecialCharacters?: boolean;
|
|
46
|
+
};
|
|
47
|
+
identityPoolId?: never;
|
|
48
|
+
allowGuestAccess?: never;
|
|
49
|
+
} | {
|
|
50
|
+
loginMechanisms: ("email" | "phone_number" | "username")[];
|
|
51
|
+
signUpAttributes: SignUpAttribute[];
|
|
52
|
+
socialProviders: SocialProvider[];
|
|
53
|
+
identityPoolId: never;
|
|
54
|
+
allowGuestAccess?: never;
|
|
55
|
+
userPoolClientId: never;
|
|
56
|
+
userPoolId: never;
|
|
57
|
+
userPoolEndpoint?: never;
|
|
58
|
+
loginWith?: never;
|
|
59
|
+
signUpVerificationMethod?: never;
|
|
60
|
+
userAttributes?: never;
|
|
61
|
+
mfa?: never;
|
|
62
|
+
passwordFormat?: never;
|
|
63
|
+
} | {
|
|
64
|
+
loginMechanisms: ("email" | "phone_number" | "username")[];
|
|
65
|
+
signUpAttributes: SignUpAttribute[];
|
|
66
|
+
socialProviders: SocialProvider[];
|
|
67
|
+
identityPoolId: string;
|
|
68
|
+
allowGuestAccess?: boolean;
|
|
69
|
+
userPoolClientId: never;
|
|
70
|
+
userPoolId: never;
|
|
71
|
+
userPoolEndpoint?: never;
|
|
72
|
+
loginWith?: never;
|
|
73
|
+
signUpVerificationMethod?: never;
|
|
74
|
+
userAttributes?: never;
|
|
75
|
+
mfa?: never;
|
|
76
|
+
passwordFormat?: never;
|
|
77
|
+
} | {
|
|
78
|
+
loginMechanisms: ("email" | "phone_number" | "username")[];
|
|
79
|
+
signUpAttributes: SignUpAttribute[];
|
|
80
|
+
socialProviders: SocialProvider[];
|
|
81
|
+
userPoolClientId: never;
|
|
82
|
+
userPoolId: never;
|
|
83
|
+
userPoolEndpoint?: never;
|
|
84
|
+
signUpVerificationMethod?: never;
|
|
85
|
+
loginWith?: never;
|
|
86
|
+
userAttributes?: never;
|
|
87
|
+
mfa?: never;
|
|
88
|
+
passwordFormat?: never;
|
|
89
|
+
identityPoolId: never;
|
|
90
|
+
allowGuestAccess?: never;
|
|
91
|
+
} | {
|
|
92
|
+
loginMechanisms: ("email" | "phone_number" | "username")[];
|
|
93
|
+
signUpAttributes: SignUpAttribute[];
|
|
94
|
+
socialProviders: SocialProvider[];
|
|
95
|
+
userPoolClientId: string;
|
|
96
|
+
userPoolId: string;
|
|
97
|
+
userPoolEndpoint?: string;
|
|
98
|
+
signUpVerificationMethod?: "link" | "code";
|
|
99
|
+
loginWith?: {
|
|
100
|
+
oauth?: import("@aws-amplify/core").OAuthConfig;
|
|
101
|
+
username?: boolean;
|
|
102
|
+
email?: boolean;
|
|
103
|
+
phone?: boolean;
|
|
104
|
+
};
|
|
105
|
+
userAttributes?: Partial<Record<import("@aws-amplify/core/internals/utils").AuthStandardAttributeKey, {
|
|
106
|
+
required: boolean;
|
|
107
|
+
}>>;
|
|
108
|
+
mfa?: {
|
|
109
|
+
status?: "on" | "optional" | "off";
|
|
110
|
+
totpEnabled?: boolean;
|
|
111
|
+
smsEnabled?: boolean;
|
|
112
|
+
};
|
|
113
|
+
passwordFormat?: {
|
|
114
|
+
minLength?: number;
|
|
115
|
+
requireLowercase?: boolean;
|
|
116
|
+
requireUppercase?: boolean;
|
|
117
|
+
requireNumbers?: boolean;
|
|
118
|
+
requireSpecialCharacters?: boolean;
|
|
119
|
+
};
|
|
120
|
+
identityPoolId: never;
|
|
121
|
+
allowGuestAccess?: never;
|
|
122
|
+
} | {
|
|
123
|
+
loginMechanisms: ("email" | "phone_number" | "username")[];
|
|
124
|
+
signUpAttributes: SignUpAttribute[];
|
|
125
|
+
socialProviders: SocialProvider[];
|
|
126
|
+
userPoolClientId: never;
|
|
127
|
+
userPoolId: never;
|
|
128
|
+
userPoolEndpoint?: never;
|
|
129
|
+
signUpVerificationMethod?: never;
|
|
130
|
+
loginWith?: never;
|
|
131
|
+
userAttributes?: never;
|
|
132
|
+
mfa?: never;
|
|
133
|
+
passwordFormat?: never;
|
|
134
|
+
identityPoolId: string;
|
|
135
|
+
allowGuestAccess?: boolean;
|
|
136
|
+
} | {
|
|
137
|
+
loginMechanisms: ("email" | "phone_number" | "username")[];
|
|
138
|
+
signUpAttributes: SignUpAttribute[];
|
|
139
|
+
socialProviders: SocialProvider[];
|
|
140
|
+
userPoolClientId: string;
|
|
141
|
+
userPoolId: string;
|
|
142
|
+
userPoolEndpoint?: string;
|
|
143
|
+
signUpVerificationMethod?: "link" | "code";
|
|
144
|
+
loginWith?: {
|
|
145
|
+
oauth?: import("@aws-amplify/core").OAuthConfig;
|
|
146
|
+
username?: boolean;
|
|
147
|
+
email?: boolean;
|
|
148
|
+
phone?: boolean;
|
|
149
|
+
};
|
|
150
|
+
userAttributes?: Partial<Record<import("@aws-amplify/core/internals/utils").AuthStandardAttributeKey, {
|
|
151
|
+
required: boolean;
|
|
152
|
+
}>>;
|
|
153
|
+
mfa?: {
|
|
154
|
+
status?: "on" | "optional" | "off";
|
|
155
|
+
totpEnabled?: boolean;
|
|
156
|
+
smsEnabled?: boolean;
|
|
157
|
+
};
|
|
158
|
+
passwordFormat?: {
|
|
159
|
+
minLength?: number;
|
|
160
|
+
requireLowercase?: boolean;
|
|
161
|
+
requireUppercase?: boolean;
|
|
162
|
+
requireNumbers?: boolean;
|
|
163
|
+
requireSpecialCharacters?: boolean;
|
|
164
|
+
};
|
|
165
|
+
identityPoolId: never;
|
|
166
|
+
allowGuestAccess?: never;
|
|
167
|
+
} | {
|
|
168
|
+
loginMechanisms: ("email" | "phone_number" | "username")[];
|
|
169
|
+
signUpAttributes: SignUpAttribute[];
|
|
170
|
+
socialProviders: SocialProvider[];
|
|
171
|
+
userPoolClientId: string;
|
|
172
|
+
userPoolId: string;
|
|
173
|
+
userPoolEndpoint?: string;
|
|
174
|
+
signUpVerificationMethod?: "link" | "code";
|
|
175
|
+
loginWith?: {
|
|
176
|
+
oauth?: import("@aws-amplify/core").OAuthConfig;
|
|
177
|
+
username?: boolean;
|
|
178
|
+
email?: boolean;
|
|
179
|
+
phone?: boolean;
|
|
180
|
+
};
|
|
181
|
+
userAttributes?: Partial<Record<import("@aws-amplify/core/internals/utils").AuthStandardAttributeKey, {
|
|
182
|
+
required: boolean;
|
|
183
|
+
}>>;
|
|
184
|
+
mfa?: {
|
|
185
|
+
status?: "on" | "optional" | "off";
|
|
186
|
+
totpEnabled?: boolean;
|
|
187
|
+
smsEnabled?: boolean;
|
|
188
|
+
};
|
|
189
|
+
passwordFormat?: {
|
|
190
|
+
minLength?: number;
|
|
191
|
+
requireLowercase?: boolean;
|
|
192
|
+
requireUppercase?: boolean;
|
|
193
|
+
requireNumbers?: boolean;
|
|
194
|
+
requireSpecialCharacters?: boolean;
|
|
195
|
+
};
|
|
196
|
+
identityPoolId: string;
|
|
197
|
+
allowGuestAccess?: boolean;
|
|
198
|
+
}>;
|
|
199
|
+
getCurrentUser: () => Promise<import("aws-amplify/auth").AuthUser>;
|
|
200
|
+
handleSignIn: typeof signIn;
|
|
201
|
+
handleSignUp: typeof signUp;
|
|
202
|
+
handleConfirmSignIn: typeof confirmSignIn;
|
|
203
|
+
handleConfirmSignUp: typeof confirmSignUp;
|
|
204
|
+
handleForgotPasswordSubmit: typeof confirmResetPassword;
|
|
205
|
+
handleForgotPassword: typeof resetPassword;
|
|
206
|
+
validateCustomSignUp(formData: AuthFormData, touchData: AuthTouchData): Promise<ValidatorResult>;
|
|
207
|
+
validateFormPassword(formData: AuthFormData, touchData: AuthTouchData, passwordSettings: PasswordSettings): Promise<ValidatorResult>;
|
|
208
|
+
validateConfirmPassword(formData: AuthFormData, touchData: AuthTouchData): Promise<ValidatorResult>;
|
|
209
|
+
validatePreferredUsername(formData: AuthFormData, touchData: AuthTouchData): Promise<ValidatorResult>;
|
|
30
210
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LoginMechanism, PasswordSettings, SignUpAttribute, SocialProvider } from '../../types';
|
|
2
|
+
export interface LegacyConfig {
|
|
3
|
+
aws_cognito_username_attributes?: string[];
|
|
4
|
+
aws_cognito_signup_attributes?: string[];
|
|
5
|
+
aws_cognito_verification_mechanisms?: string[];
|
|
6
|
+
aws_cognito_social_providers?: string[];
|
|
7
|
+
aws_cognito_password_protection_settings?: Record<string, any>;
|
|
8
|
+
}
|
|
9
|
+
export declare function getAuthenticatorConfig<T extends LegacyConfig>(config: T): {
|
|
10
|
+
loginMechanisms: LoginMechanism[] | undefined;
|
|
11
|
+
signUpAttributes: SignUpAttribute[] | undefined;
|
|
12
|
+
socialProviders: SocialProvider[] | undefined;
|
|
13
|
+
passwordSettings: PasswordSettings | undefined;
|
|
14
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AuthEvent, AuthContext } from './types';
|
|
2
2
|
export type AuthenticatorMachineOptions = AuthContext['config'] & {
|
|
3
3
|
services?: AuthContext['services'];
|
|
4
4
|
};
|
|
5
|
-
export declare function createAuthenticatorMachine(
|
|
5
|
+
export declare function createAuthenticatorMachine(options?: AuthenticatorMachineOptions & {
|
|
6
|
+
useNextWaitConfig?: boolean;
|
|
7
|
+
}): import("xstate").StateMachine<AuthContext, any, AuthEvent, {
|
|
6
8
|
value: any;
|
|
7
9
|
context: AuthContext;
|
|
8
10
|
}, import("xstate").BaseActionObject, import("xstate").ServiceMap, import("xstate").ResolveTypegenMeta<import("xstate").TypegenDisabled, AuthEvent, import("xstate").BaseActionObject, import("xstate").ServiceMap>>;
|