@openedx/frontend-app-authn 1.0.0-alpha.5 → 1.0.0-alpha.6
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/Main.d.ts +3 -0
- package/{src/Main.tsx → dist/Main.js} +4 -15
- package/dist/Main.js.map +1 -0
- package/dist/app.d.ts +3 -0
- package/dist/app.js +41 -0
- package/dist/app.js.map +1 -0
- package/{src → dist}/app.scss +1 -1
- package/dist/base-container/components/default-layout/LargeLayout.d.ts +2 -0
- package/dist/base-container/components/default-layout/LargeLayout.js +11 -0
- package/dist/base-container/components/default-layout/LargeLayout.js.map +1 -0
- package/dist/base-container/components/default-layout/MediumLayout.d.ts +2 -0
- package/dist/base-container/components/default-layout/MediumLayout.js +11 -0
- package/dist/base-container/components/default-layout/MediumLayout.js.map +1 -0
- package/dist/base-container/components/default-layout/SmallLayout.d.ts +2 -0
- package/dist/base-container/components/default-layout/SmallLayout.js +11 -0
- package/dist/base-container/components/default-layout/SmallLayout.js.map +1 -0
- package/dist/base-container/components/default-layout/index.d.ts +3 -0
- package/{src/base-container/components/default-layout/index.jsx → dist/base-container/components/default-layout/index.js} +1 -0
- package/dist/base-container/components/default-layout/index.js.map +1 -0
- package/dist/base-container/components/default-layout/messages.d.ts +13 -0
- package/dist/base-container/components/default-layout/messages.js +15 -0
- package/dist/base-container/components/default-layout/messages.js.map +1 -0
- package/dist/base-container/components/image-layout/ExtraSmallLayout.d.ts +2 -0
- package/dist/base-container/components/image-layout/ExtraSmallLayout.js +10 -0
- package/dist/base-container/components/image-layout/ExtraSmallLayout.js.map +1 -0
- package/dist/base-container/components/image-layout/LargeLayout.d.ts +2 -0
- package/dist/base-container/components/image-layout/LargeLayout.js +11 -0
- package/dist/base-container/components/image-layout/LargeLayout.js.map +1 -0
- package/dist/base-container/components/image-layout/MediumLayout.d.ts +2 -0
- package/dist/base-container/components/image-layout/MediumLayout.js +11 -0
- package/dist/base-container/components/image-layout/MediumLayout.js.map +1 -0
- package/dist/base-container/components/image-layout/SmallLayout.d.ts +2 -0
- package/dist/base-container/components/image-layout/SmallLayout.js +10 -0
- package/dist/base-container/components/image-layout/SmallLayout.js.map +1 -0
- package/dist/base-container/components/image-layout/index.d.ts +4 -0
- package/{src/base-container/components/image-layout/index.jsx → dist/base-container/components/image-layout/index.js} +1 -0
- package/dist/base-container/components/image-layout/index.js.map +1 -0
- package/dist/base-container/components/image-layout/messages.d.ts +13 -0
- package/dist/base-container/components/image-layout/messages.js +15 -0
- package/dist/base-container/components/image-layout/messages.js.map +1 -0
- package/dist/base-container/components/welcome-page-layout/LargeLayout.d.ts +10 -0
- package/dist/base-container/components/welcome-page-layout/LargeLayout.js +14 -0
- package/dist/base-container/components/welcome-page-layout/LargeLayout.js.map +1 -0
- package/dist/base-container/components/welcome-page-layout/MediumLayout.d.ts +10 -0
- package/dist/base-container/components/welcome-page-layout/MediumLayout.js +14 -0
- package/dist/base-container/components/welcome-page-layout/MediumLayout.js.map +1 -0
- package/dist/base-container/components/welcome-page-layout/SmallLayout.d.ts +10 -0
- package/dist/base-container/components/welcome-page-layout/SmallLayout.js +14 -0
- package/dist/base-container/components/welcome-page-layout/SmallLayout.js.map +1 -0
- package/dist/base-container/components/welcome-page-layout/index.d.ts +3 -0
- package/{src/base-container/components/welcome-page-layout/index.jsx → dist/base-container/components/welcome-page-layout/index.js} +1 -0
- package/dist/base-container/components/welcome-page-layout/index.js.map +1 -0
- package/dist/base-container/components/welcome-page-layout/messages.d.ts +18 -0
- package/dist/base-container/components/welcome-page-layout/messages.js +20 -0
- package/dist/base-container/components/welcome-page-layout/messages.js.map +1 -0
- package/dist/base-container/index.d.ts +20 -0
- package/dist/base-container/index.js +27 -0
- package/dist/base-container/index.js.map +1 -0
- package/dist/common-components/EmbeddedRegistrationRoute.d.ts +14 -0
- package/{src/common-components/EmbeddedRegistrationRoute.jsx → dist/common-components/EmbeddedRegistrationRoute.js} +9 -13
- package/dist/common-components/EmbeddedRegistrationRoute.js.map +1 -0
- package/dist/common-components/EnterpriseSSO.d.ts +29 -0
- package/dist/common-components/EnterpriseSSO.js +55 -0
- package/dist/common-components/EnterpriseSSO.js.map +1 -0
- package/dist/common-components/FormGroup.d.ts +60 -0
- package/dist/common-components/FormGroup.js +66 -0
- package/dist/common-components/FormGroup.js.map +1 -0
- package/dist/common-components/InstitutionLogistration.d.ts +34 -0
- package/dist/common-components/InstitutionLogistration.js +38 -0
- package/dist/common-components/InstitutionLogistration.js.map +1 -0
- package/dist/common-components/NotFoundPage.d.ts +2 -0
- package/dist/common-components/NotFoundPage.js +5 -0
- package/dist/common-components/NotFoundPage.js.map +1 -0
- package/dist/common-components/PasswordField.d.ts +39 -0
- package/dist/common-components/PasswordField.js +94 -0
- package/dist/common-components/PasswordField.js.map +1 -0
- package/dist/common-components/RedirectLogistration.d.ts +39 -0
- package/dist/common-components/RedirectLogistration.js +68 -0
- package/dist/common-components/RedirectLogistration.js.map +1 -0
- package/dist/common-components/RegisterFaIcons.d.ts +1 -0
- package/dist/common-components/RegisterFaIcons.js +6 -0
- package/dist/common-components/RegisterFaIcons.js.map +1 -0
- package/dist/common-components/SocialAuthProviders.d.ts +23 -0
- package/dist/common-components/SocialAuthProviders.js +42 -0
- package/dist/common-components/SocialAuthProviders.js.map +1 -0
- package/dist/common-components/ThirdPartyAuth.d.ts +42 -0
- package/dist/common-components/ThirdPartyAuth.js +56 -0
- package/dist/common-components/ThirdPartyAuth.js.map +1 -0
- package/dist/common-components/ThirdPartyAuthAlert.d.ts +15 -0
- package/dist/common-components/ThirdPartyAuthAlert.js +32 -0
- package/dist/common-components/ThirdPartyAuthAlert.js.map +1 -0
- package/dist/common-components/UnAuthOnlyRoute.d.ts +14 -0
- package/dist/common-components/UnAuthOnlyRoute.js +31 -0
- package/dist/common-components/UnAuthOnlyRoute.js.map +1 -0
- package/dist/common-components/data/actions.d.ts +26 -0
- package/{src → dist}/common-components/data/actions.js +8 -13
- package/dist/common-components/data/actions.js.map +1 -0
- package/dist/common-components/data/reducers.d.ts +62 -0
- package/dist/common-components/data/reducers.js +39 -0
- package/dist/common-components/data/reducers.js.map +1 -0
- package/dist/common-components/data/sagas.d.ts +12 -0
- package/dist/common-components/data/sagas.js +21 -0
- package/dist/common-components/data/sagas.js.map +1 -0
- package/dist/common-components/data/selectors.d.ts +98 -0
- package/dist/common-components/data/selectors.js +11 -0
- package/dist/common-components/data/selectors.js.map +1 -0
- package/dist/common-components/data/service.d.ts +5 -0
- package/dist/common-components/data/service.js +31 -0
- package/dist/common-components/data/service.js.map +1 -0
- package/dist/common-components/index.d.ts +13 -0
- package/{src/common-components/index.jsx → dist/common-components/index.js} +1 -0
- package/dist/common-components/index.js.map +1 -0
- package/dist/common-components/messages.d.ts +113 -0
- package/dist/common-components/messages.js +126 -0
- package/dist/common-components/messages.js.map +1 -0
- package/dist/constants.d.ts +1 -0
- package/{src/constants.ts → dist/constants.js} +1 -0
- package/dist/constants.js.map +1 -0
- package/dist/data/configureStore.d.ts +3 -0
- package/{src → dist}/data/configureStore.js +11 -20
- package/dist/data/configureStore.js.map +1 -0
- package/dist/data/constants.d.ts +24 -0
- package/{src → dist}/data/constants.js +4 -8
- package/dist/data/constants.js.map +1 -0
- package/dist/data/countries.d.ts +26 -0
- package/{src/data/countries.ts → dist/data/countries.js} +6 -9
- package/dist/data/countries.js.map +1 -0
- package/dist/data/oneTrust.d.ts +2 -0
- package/dist/data/oneTrust.js +3 -0
- package/dist/data/oneTrust.js.map +1 -0
- package/dist/data/reducers.d.ts +254 -0
- package/dist/data/reducers.js +17 -0
- package/dist/data/reducers.js.map +1 -0
- package/dist/data/sagas.d.ts +1 -0
- package/{src → dist}/data/sagas.js +9 -10
- package/dist/data/sagas.js.map +1 -0
- package/dist/data/utils/cookies.d.ts +1 -0
- package/dist/data/utils/cookies.js +12 -0
- package/dist/data/utils/cookies.js.map +1 -0
- package/dist/data/utils/dataUtils.d.ts +11 -0
- package/dist/data/utils/dataUtils.js +67 -0
- package/dist/data/utils/dataUtils.js.map +1 -0
- package/dist/data/utils/index.d.ts +3 -0
- package/dist/data/utils/index.js +4 -0
- package/dist/data/utils/index.js.map +1 -0
- package/dist/data/utils/reduxUtils.d.ts +15 -0
- package/dist/data/utils/reduxUtils.js +29 -0
- package/dist/data/utils/reduxUtils.js.map +1 -0
- package/dist/data/utils/useMobileResponsive.d.ts +7 -0
- package/dist/data/utils/useMobileResponsive.js +22 -0
- package/dist/data/utils/useMobileResponsive.js.map +1 -0
- package/dist/field-renderer/FieldRenderer.d.ts +34 -0
- package/dist/field-renderer/FieldRenderer.js +70 -0
- package/dist/field-renderer/FieldRenderer.js.map +1 -0
- package/dist/field-renderer/index.d.ts +1 -0
- package/{src/field-renderer/index.jsx → dist/field-renderer/index.js} +1 -0
- package/dist/field-renderer/index.js.map +1 -0
- package/dist/forgot-password/ForgotPasswordAlert.d.ts +16 -0
- package/dist/forgot-password/ForgotPasswordAlert.js +66 -0
- package/dist/forgot-password/ForgotPasswordAlert.js.map +1 -0
- package/dist/forgot-password/ForgotPasswordPage.d.ts +36 -0
- package/dist/forgot-password/ForgotPasswordPage.js +91 -0
- package/dist/forgot-password/ForgotPasswordPage.js.map +1 -0
- package/dist/forgot-password/data/actions.d.ts +30 -0
- package/{src → dist}/forgot-password/data/actions.js +10 -16
- package/dist/forgot-password/data/actions.js.map +1 -0
- package/dist/forgot-password/data/reducers.d.ts +13 -0
- package/dist/forgot-password/data/reducers.js +46 -0
- package/dist/forgot-password/data/reducers.js.map +1 -0
- package/dist/forgot-password/data/sagas.d.ts +4 -0
- package/dist/forgot-password/data/sagas.js +28 -0
- package/dist/forgot-password/data/sagas.js.map +1 -0
- package/dist/forgot-password/data/selectors.d.ts +23 -0
- package/dist/forgot-password/data/selectors.js +5 -0
- package/dist/forgot-password/data/selectors.js.map +1 -0
- package/dist/forgot-password/data/service.d.ts +1 -0
- package/dist/forgot-password/data/service.js +26 -0
- package/dist/forgot-password/data/service.js.map +1 -0
- package/dist/forgot-password/index.d.ts +5 -0
- package/{src → dist}/forgot-password/index.js +1 -0
- package/dist/forgot-password/index.js.map +1 -0
- package/dist/forgot-password/messages.d.ts +123 -0
- package/dist/forgot-password/messages.js +128 -0
- package/dist/forgot-password/messages.js.map +1 -0
- package/dist/i18n/index.d.ts +25 -0
- package/dist/i18n/index.js +26 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/login/AccountActivationMessage.d.ts +14 -0
- package/dist/login/AccountActivationMessage.js +49 -0
- package/dist/login/AccountActivationMessage.js.map +1 -0
- package/dist/login/ChangePasswordPrompt.d.ts +18 -0
- package/dist/login/ChangePasswordPrompt.js +45 -0
- package/dist/login/ChangePasswordPrompt.js.map +1 -0
- package/dist/login/LoginFailure.d.ts +25 -0
- package/dist/login/LoginFailure.js +109 -0
- package/dist/login/LoginFailure.js.map +1 -0
- package/dist/login/LoginPage.d.ts +10 -0
- package/dist/login/LoginPage.js +216 -0
- package/dist/login/LoginPage.js.map +1 -0
- package/dist/login/data/actions.d.ts +36 -0
- package/{src → dist}/login/data/actions.js +12 -19
- package/dist/login/data/actions.js.map +1 -0
- package/dist/login/data/constants.d.ts +17 -0
- package/{src → dist}/login/data/constants.js +4 -4
- package/dist/login/data/constants.js.map +1 -0
- package/dist/login/data/reducers.d.ts +82 -0
- package/dist/login/data/reducers.js +44 -0
- package/dist/login/data/reducers.js.map +1 -0
- package/dist/login/data/sagas.d.ts +10 -0
- package/dist/login/data/sagas.js +34 -0
- package/dist/login/data/sagas.js.map +1 -0
- package/dist/login/data/service.d.ts +4 -0
- package/dist/login/data/service.js +32 -0
- package/dist/login/data/service.js.map +1 -0
- package/dist/login/index.d.ts +4 -0
- package/{src → dist}/login/index.js +1 -1
- package/dist/login/index.js.map +1 -0
- package/dist/login/messages.d.ts +198 -0
- package/dist/login/messages.js +210 -0
- package/dist/login/messages.js.map +1 -0
- package/dist/logistration/Logistration.d.ts +32 -0
- package/dist/logistration/Logistration.js +106 -0
- package/dist/logistration/Logistration.js.map +1 -0
- package/dist/progressive-profiling/ProgressiveProfiling.d.ts +46 -0
- package/dist/progressive-profiling/ProgressiveProfiling.js +167 -0
- package/dist/progressive-profiling/ProgressiveProfiling.js.map +1 -0
- package/dist/progressive-profiling/ProgressiveProfilingPageModal.d.ts +13 -0
- package/dist/progressive-profiling/ProgressiveProfilingPageModal.js +24 -0
- package/dist/progressive-profiling/ProgressiveProfilingPageModal.js.map +1 -0
- package/dist/progressive-profiling/data/actions.d.ts +19 -0
- package/{src → dist}/progressive-profiling/data/actions.js +6 -10
- package/dist/progressive-profiling/data/actions.js.map +1 -0
- package/dist/progressive-profiling/data/reducers.d.ts +22 -0
- package/dist/progressive-profiling/data/reducers.js +23 -0
- package/dist/progressive-profiling/data/reducers.js.map +1 -0
- package/dist/progressive-profiling/data/sagas.d.ts +4 -0
- package/dist/progressive-profiling/data/sagas.js +17 -0
- package/dist/progressive-profiling/data/sagas.js.map +1 -0
- package/dist/progressive-profiling/data/selectors.d.ts +39 -0
- package/{src → dist}/progressive-profiling/data/selectors.js +4 -9
- package/dist/progressive-profiling/data/selectors.js.map +1 -0
- package/dist/progressive-profiling/data/service.d.ts +1 -0
- package/dist/progressive-profiling/data/service.js +23 -0
- package/dist/progressive-profiling/data/service.js.map +1 -0
- package/dist/progressive-profiling/index.d.ts +4 -0
- package/{src → dist}/progressive-profiling/index.js +1 -1
- package/dist/progressive-profiling/index.js.map +1 -0
- package/dist/progressive-profiling/messages.d.ts +53 -0
- package/dist/progressive-profiling/messages.js +57 -0
- package/dist/progressive-profiling/messages.js.map +1 -0
- package/dist/register/RegistrationFields/CountryField/CountryField.d.ts +38 -0
- package/dist/register/RegistrationFields/CountryField/CountryField.js +95 -0
- package/dist/register/RegistrationFields/CountryField/CountryField.js.map +1 -0
- package/dist/register/RegistrationFields/CountryField/validator.d.ts +8 -0
- package/dist/register/RegistrationFields/CountryField/validator.js +29 -0
- package/dist/register/RegistrationFields/CountryField/validator.js.map +1 -0
- package/dist/register/RegistrationFields/EmailField/EmailField.d.ts +30 -0
- package/dist/register/RegistrationFields/EmailField/EmailField.js +80 -0
- package/dist/register/RegistrationFields/EmailField/EmailField.js.map +1 -0
- package/dist/register/RegistrationFields/EmailField/constants.d.ts +3 -0
- package/dist/register/RegistrationFields/EmailField/constants.js +130 -0
- package/dist/register/RegistrationFields/EmailField/constants.js.map +1 -0
- package/dist/register/RegistrationFields/EmailField/validator.d.ts +17 -0
- package/dist/register/RegistrationFields/EmailField/validator.js +107 -0
- package/dist/register/RegistrationFields/EmailField/validator.js.map +1 -0
- package/dist/register/RegistrationFields/HonorCodeField/HonorCode.d.ts +21 -0
- package/dist/register/RegistrationFields/HonorCodeField/HonorCode.js +40 -0
- package/dist/register/RegistrationFields/HonorCodeField/HonorCode.js.map +1 -0
- package/dist/register/RegistrationFields/NameField/NameField.d.ts +29 -0
- package/dist/register/RegistrationFields/NameField/NameField.js +52 -0
- package/dist/register/RegistrationFields/NameField/NameField.js.map +1 -0
- package/dist/register/RegistrationFields/NameField/validator.d.ts +5 -0
- package/{src → dist}/register/RegistrationFields/NameField/validator.js +9 -12
- package/dist/register/RegistrationFields/NameField/validator.js.map +1 -0
- package/dist/register/RegistrationFields/TermsOfServiceField/TermsOfService.d.ts +16 -0
- package/dist/register/RegistrationFields/TermsOfServiceField/TermsOfService.js +24 -0
- package/dist/register/RegistrationFields/TermsOfServiceField/TermsOfService.js.map +1 -0
- package/dist/register/RegistrationFields/UsernameField/UsernameField.d.ts +31 -0
- package/dist/register/RegistrationFields/UsernameField/UsernameField.js +113 -0
- package/dist/register/RegistrationFields/UsernameField/UsernameField.js.map +1 -0
- package/dist/register/RegistrationFields/UsernameField/validator.d.ts +4 -0
- package/dist/register/RegistrationFields/UsernameField/validator.js +15 -0
- package/dist/register/RegistrationFields/UsernameField/validator.js.map +1 -0
- package/dist/register/RegistrationFields/index.d.ts +6 -0
- package/{src → dist}/register/RegistrationFields/index.js +1 -0
- package/dist/register/RegistrationFields/index.js.map +1 -0
- package/dist/register/RegistrationPage.d.ts +18 -0
- package/dist/register/RegistrationPage.js +216 -0
- package/dist/register/RegistrationPage.js.map +1 -0
- package/dist/register/components/ConfigurableRegistrationForm.d.ts +37 -0
- package/dist/register/components/ConfigurableRegistrationForm.js +145 -0
- package/dist/register/components/ConfigurableRegistrationForm.js.map +1 -0
- package/dist/register/components/RegistrationFailure.d.ts +19 -0
- package/dist/register/components/RegistrationFailure.js +57 -0
- package/dist/register/components/RegistrationFailure.js.map +1 -0
- package/dist/register/data/actions.d.ts +80 -0
- package/{src → dist}/register/data/actions.js +26 -42
- package/dist/register/data/actions.js.map +1 -0
- package/dist/register/data/constants.d.ts +10 -0
- package/{src → dist}/register/data/constants.js +4 -4
- package/dist/register/data/constants.js.map +1 -0
- package/dist/register/data/reducers.d.ts +237 -0
- package/dist/register/data/reducers.js +86 -0
- package/dist/register/data/reducers.js.map +1 -0
- package/dist/register/data/sagas.d.ts +19 -0
- package/dist/register/data/sagas.js +45 -0
- package/dist/register/data/sagas.js.map +1 -0
- package/dist/register/data/selectors.d.ts +26 -0
- package/dist/register/data/selectors.js +25 -0
- package/dist/register/data/selectors.js.map +1 -0
- package/dist/register/data/service.d.ts +8 -0
- package/dist/register/data/service.js +46 -0
- package/dist/register/data/service.js.map +1 -0
- package/dist/register/data/utils.d.ts +6 -0
- package/dist/register/data/utils.js +128 -0
- package/dist/register/data/utils.js.map +1 -0
- package/dist/register/index.d.ts +3 -0
- package/{src → dist}/register/index.js +1 -0
- package/dist/register/index.js.map +1 -0
- package/dist/register/messages.d.ts +193 -0
- package/dist/register/messages.js +205 -0
- package/dist/register/messages.js.map +1 -0
- package/dist/reset-password/ResetPasswordFailure.d.ts +15 -0
- package/dist/reset-password/ResetPasswordFailure.js +44 -0
- package/dist/reset-password/ResetPasswordFailure.js.map +1 -0
- package/dist/reset-password/ResetPasswordPage.d.ts +32 -0
- package/dist/reset-password/ResetPasswordPage.js +150 -0
- package/dist/reset-password/ResetPasswordPage.js.map +1 -0
- package/dist/reset-password/ResetPasswordSuccess.d.ts +2 -0
- package/dist/reset-password/ResetPasswordSuccess.js +10 -0
- package/dist/reset-password/ResetPasswordSuccess.js.map +1 -0
- package/dist/reset-password/data/actions.d.ts +56 -0
- package/{src → dist}/reset-password/data/actions.js +17 -26
- package/dist/reset-password/data/actions.js.map +1 -0
- package/dist/reset-password/data/constants.d.ts +13 -0
- package/{src → dist}/reset-password/data/constants.js +6 -7
- package/dist/reset-password/data/constants.js.map +1 -0
- package/dist/reset-password/data/reducers.d.ts +19 -0
- package/dist/reset-password/data/reducers.js +25 -0
- package/dist/reset-password/data/reducers.js.map +1 -0
- package/dist/reset-password/data/sagas.d.ts +7 -0
- package/dist/reset-password/data/sagas.js +63 -0
- package/dist/reset-password/data/sagas.js.map +1 -0
- package/dist/reset-password/data/selectors.d.ts +23 -0
- package/dist/reset-password/data/selectors.js +5 -0
- package/dist/reset-password/data/selectors.js.map +1 -0
- package/dist/reset-password/data/service.d.ts +3 -0
- package/dist/reset-password/data/service.js +62 -0
- package/dist/reset-password/data/service.js.map +1 -0
- package/dist/reset-password/index.d.ts +5 -0
- package/{src → dist}/reset-password/index.js +1 -0
- package/dist/reset-password/index.js.map +1 -0
- package/dist/reset-password/messages.d.ts +83 -0
- package/dist/reset-password/messages.js +87 -0
- package/dist/reset-password/messages.js.map +1 -0
- package/dist/routes.d.ts +18 -0
- package/dist/routes.js +75 -0
- package/dist/routes.js.map +1 -0
- package/package.json +12 -5
- package/src/__mocks__/file.js +0 -1
- package/src/__mocks__/svg.js +0 -1
- package/src/app.ts +0 -43
- package/src/base-container/components/default-layout/DefaultLayout.test.jsx +0 -48
- package/src/base-container/components/default-layout/LargeLayout.jsx +0 -42
- package/src/base-container/components/default-layout/MediumLayout.jsx +0 -49
- package/src/base-container/components/default-layout/SmallLayout.jsx +0 -37
- package/src/base-container/components/default-layout/messages.js +0 -16
- package/src/base-container/components/image-layout/ExtraSmallLayout.jsx +0 -31
- package/src/base-container/components/image-layout/LargeLayout.jsx +0 -32
- package/src/base-container/components/image-layout/MediumLayout.jsx +0 -32
- package/src/base-container/components/image-layout/SmallLayout.jsx +0 -31
- package/src/base-container/components/image-layout/messages.js +0 -16
- package/src/base-container/components/welcome-page-layout/LargeLayout.jsx +0 -46
- package/src/base-container/components/welcome-page-layout/MediumLayout.jsx +0 -49
- package/src/base-container/components/welcome-page-layout/SmallLayout.jsx +0 -38
- package/src/base-container/components/welcome-page-layout/messages.js +0 -21
- package/src/base-container/index.jsx +0 -70
- package/src/base-container/tests/BaseContainer.test.jsx +0 -44
- package/src/common-components/EnterpriseSSO.jsx +0 -110
- package/src/common-components/FormGroup.jsx +0 -106
- package/src/common-components/InstitutionLogistration.jsx +0 -102
- package/src/common-components/NotFoundPage.jsx +0 -15
- package/src/common-components/PasswordField.jsx +0 -175
- package/src/common-components/RedirectLogistration.jsx +0 -94
- package/src/common-components/RegisterFaIcons.jsx +0 -8
- package/src/common-components/SocialAuthProviders.jsx +0 -75
- package/src/common-components/ThirdPartyAuth.jsx +0 -123
- package/src/common-components/ThirdPartyAuthAlert.jsx +0 -49
- package/src/common-components/UnAuthOnlyRoute.jsx +0 -41
- package/src/common-components/data/reducers.js +0 -63
- package/src/common-components/data/sagas.js +0 -32
- package/src/common-components/data/selectors.js +0 -28
- package/src/common-components/data/service.js +0 -23
- package/src/common-components/data/tests/reducer.test.js +0 -82
- package/src/common-components/data/tests/sagas.test.js +0 -71
- package/src/common-components/messages.jsx +0 -127
- package/src/common-components/tests/EmbeddedRegistrationRoute.test.jsx +0 -76
- package/src/common-components/tests/FormField.test.jsx +0 -289
- package/src/common-components/tests/SocialAuthProviders.test.jsx +0 -75
- package/src/common-components/tests/ThirdPartyAuthAlert.test.jsx +0 -39
- package/src/common-components/tests/UnAuthOnlyRoute.test.jsx +0 -73
- package/src/common-components/tests/__snapshots__/SocialAuthProviders.test.jsx.snap +0 -156
- package/src/common-components/tests/__snapshots__/ThirdPartyAuthAlert.test.jsx.snap +0 -53
- package/src/data/oneTrust.js +0 -3
- package/src/data/reducers.js +0 -36
- package/src/data/tests/cookies.test.js +0 -42
- package/src/data/tests/dataUtils.test.js +0 -19
- package/src/data/tests/reduxUtils.test.js +0 -14
- package/src/data/utils/cookies.js +0 -12
- package/src/data/utils/dataUtils.js +0 -81
- package/src/data/utils/index.js +0 -11
- package/src/data/utils/reduxUtils.js +0 -34
- package/src/data/utils/useMobileResponsive.js +0 -24
- package/src/field-renderer/FieldRenderer.jsx +0 -156
- package/src/field-renderer/tests/FieldRenderer.test.jsx +0 -201
- package/src/forgot-password/ForgotPasswordAlert.jsx +0 -97
- package/src/forgot-password/ForgotPasswordPage.jsx +0 -193
- package/src/forgot-password/data/reducers.js +0 -58
- package/src/forgot-password/data/sagas.js +0 -35
- package/src/forgot-password/data/selectors.js +0 -10
- package/src/forgot-password/data/service.js +0 -21
- package/src/forgot-password/data/tests/reducers.test.js +0 -34
- package/src/forgot-password/data/tests/sagas.test.js +0 -67
- package/src/forgot-password/messages.js +0 -128
- package/src/forgot-password/tests/ForgotPasswordPage.test.jsx +0 -269
- package/src/i18n/index.js +0 -25
- package/src/login/AccountActivationMessage.jsx +0 -78
- package/src/login/ChangePasswordPrompt.jsx +0 -91
- package/src/login/LoginFailure.jsx +0 -231
- package/src/login/LoginPage.jsx +0 -368
- package/src/login/data/reducers.js +0 -76
- package/src/login/data/sagas.js +0 -45
- package/src/login/data/service.js +0 -27
- package/src/login/data/tests/reducers.test.js +0 -155
- package/src/login/data/tests/sagas.test.js +0 -110
- package/src/login/messages.jsx +0 -211
- package/src/login/tests/AccountActivationMessage.test.jsx +0 -122
- package/src/login/tests/ChangePasswordPrompt.test.jsx +0 -75
- package/src/login/tests/LoginFailure.test.jsx +0 -323
- package/src/login/tests/LoginPage.test.jsx +0 -839
- package/src/logistration/Logistration.jsx +0 -189
- package/src/logistration/Logistration.test.jsx +0 -275
- package/src/progressive-profiling/ProgressiveProfiling.jsx +0 -313
- package/src/progressive-profiling/ProgressiveProfilingPageModal.jsx +0 -56
- package/src/progressive-profiling/data/reducers.js +0 -38
- package/src/progressive-profiling/data/sagas.js +0 -24
- package/src/progressive-profiling/data/service.js +0 -17
- package/src/progressive-profiling/messages.jsx +0 -57
- package/src/progressive-profiling/tests/ProgressiveProfiling.test.jsx +0 -322
- package/src/register/RegistrationFields/CountryField/CountryField.jsx +0 -164
- package/src/register/RegistrationFields/CountryField/CountryField.test.jsx +0 -204
- package/src/register/RegistrationFields/CountryField/validator.js +0 -32
- package/src/register/RegistrationFields/EmailField/EmailField.jsx +0 -140
- package/src/register/RegistrationFields/EmailField/EmailField.test.jsx +0 -236
- package/src/register/RegistrationFields/EmailField/constants.js +0 -131
- package/src/register/RegistrationFields/EmailField/validator.js +0 -126
- package/src/register/RegistrationFields/EmailField/validator.test.js +0 -39
- package/src/register/RegistrationFields/HonorCodeField/HonorCode.jsx +0 -104
- package/src/register/RegistrationFields/HonorCodeField/HonorCode.test.jsx +0 -70
- package/src/register/RegistrationFields/NameField/NameField.jsx +0 -68
- package/src/register/RegistrationFields/NameField/NameField.test.jsx +0 -146
- package/src/register/RegistrationFields/TermsOfServiceField/TermsOfService.jsx +0 -58
- package/src/register/RegistrationFields/TermsOfServiceField/TermsOfService.test.jsx +0 -55
- package/src/register/RegistrationFields/UsernameField/UsernameField.jsx +0 -162
- package/src/register/RegistrationFields/UsernameField/UsernameField.test.jsx +0 -319
- package/src/register/RegistrationFields/UsernameField/validator.js +0 -16
- package/src/register/RegistrationPage.jsx +0 -428
- package/src/register/RegistrationPage.test.jsx +0 -854
- package/src/register/components/ConfigurableRegistrationForm.jsx +0 -244
- package/src/register/components/RegistrationFailure.jsx +0 -80
- package/src/register/components/tests/ConfigurableRegistrationForm.test.jsx +0 -401
- package/src/register/components/tests/RegistrationFailure.test.jsx +0 -212
- package/src/register/components/tests/ThirdPartyAuth.test.jsx +0 -439
- package/src/register/data/reducers.js +0 -140
- package/src/register/data/sagas.js +0 -58
- package/src/register/data/selectors.js +0 -34
- package/src/register/data/service.js +0 -45
- package/src/register/data/tests/reducers.test.js +0 -277
- package/src/register/data/tests/sagas.test.js +0 -239
- package/src/register/data/tests/utils.test.js +0 -98
- package/src/register/data/utils.js +0 -147
- package/src/register/messages.jsx +0 -206
- package/src/reset-password/ResetPasswordFailure.jsx +0 -55
- package/src/reset-password/ResetPasswordPage.jsx +0 -224
- package/src/reset-password/ResetPasswordSuccess.jsx +0 -19
- package/src/reset-password/data/reducers.js +0 -44
- package/src/reset-password/data/sagas.js +0 -67
- package/src/reset-password/data/selectors.js +0 -10
- package/src/reset-password/data/service.js +0 -61
- package/src/reset-password/data/tests/sagas.test.js +0 -185
- package/src/reset-password/messages.js +0 -88
- package/src/reset-password/tests/ResetPasswordPage.test.jsx +0 -241
- package/src/routes.jsx +0 -79
- package/src/setupTest.js +0 -68
- /package/{src → dist}/base-container/components/image-layout/index.scss +0 -0
- /package/{src/index.ts → dist/index.d.ts} +0 -0
- /package/{src → dist}/sass/_base_component.scss +0 -0
- /package/{src → dist}/sass/_forgot_password.scss +0 -0
- /package/{src → dist}/sass/_login_page.scss +0 -0
- /package/{src → dist}/sass/_progressive_profiling_page.scss +0 -0
- /package/{src → dist}/sass/_registration.scss +0 -0
- /package/{src → dist}/sass/_reset_password.scss +0 -0
- /package/{src → dist}/sass/_style.scss +0 -0
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { getSiteConfig, useIntl } from '@openedx/frontend-base';
|
|
2
|
-
import { Button, Hyperlink, Icon } from '@openedx/paragon';
|
|
3
|
-
import { Institution } from '@openedx/paragon/icons';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
|
|
6
|
-
import messages from './messages';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* This component renders the Institution login button
|
|
10
|
-
* */
|
|
11
|
-
export const RenderInstitutionButton = props => {
|
|
12
|
-
const { onSubmitHandler, buttonTitle } = props;
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<Button
|
|
16
|
-
className="btn-sm text-body p-0 mb-4 border-0"
|
|
17
|
-
variant="link"
|
|
18
|
-
data-event-name="institution_login"
|
|
19
|
-
onClick={onSubmitHandler}
|
|
20
|
-
>
|
|
21
|
-
<Icon src={Institution} className="institute-icon" />
|
|
22
|
-
{buttonTitle}
|
|
23
|
-
</Button>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* This component renders the page list of available institutions for login
|
|
29
|
-
* */
|
|
30
|
-
const InstitutionLogistration = props => {
|
|
31
|
-
const lmsBaseUrl = getSiteConfig().lmsBaseUrl;
|
|
32
|
-
const { formatMessage } = useIntl();
|
|
33
|
-
const {
|
|
34
|
-
secondaryProviders,
|
|
35
|
-
headingTitle,
|
|
36
|
-
} = props;
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<>
|
|
40
|
-
<div className="d-flex justify-content-left mb-4 mt-2">
|
|
41
|
-
<div className="flex-column">
|
|
42
|
-
<h4 className="mb-2 font-weight-bold institutions__heading">
|
|
43
|
-
{headingTitle}
|
|
44
|
-
</h4>
|
|
45
|
-
<p className="mb-2">
|
|
46
|
-
{formatMessage(messages['institution.login.page.sub.heading'])}
|
|
47
|
-
</p>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
<div className="mb-5">
|
|
51
|
-
<table className="pgn__data-table table-striped table-borderless">
|
|
52
|
-
<tbody>
|
|
53
|
-
{secondaryProviders.map(provider => (
|
|
54
|
-
<tr key={provider} className="pgn__data-table-row">
|
|
55
|
-
<td>
|
|
56
|
-
<Hyperlink
|
|
57
|
-
className="btn nav-item p-0 mb-1 institutions--provider-link"
|
|
58
|
-
destination={lmsBaseUrl + provider.loginUrl}
|
|
59
|
-
>
|
|
60
|
-
{provider.name}
|
|
61
|
-
</Hyperlink>
|
|
62
|
-
</td>
|
|
63
|
-
</tr>
|
|
64
|
-
))}
|
|
65
|
-
</tbody>
|
|
66
|
-
</table>
|
|
67
|
-
</div>
|
|
68
|
-
</>
|
|
69
|
-
);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
const LogistrationDefaultProps = {
|
|
73
|
-
secondaryProviders: [],
|
|
74
|
-
buttonTitle: '',
|
|
75
|
-
};
|
|
76
|
-
const LogistrationProps = {
|
|
77
|
-
secondaryProviders: PropTypes.arrayOf(PropTypes.shape({
|
|
78
|
-
name: PropTypes.string.isRequired,
|
|
79
|
-
loginUrl: PropTypes.string.isRequired,
|
|
80
|
-
})),
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
RenderInstitutionButton.propTypes = {
|
|
84
|
-
...LogistrationProps,
|
|
85
|
-
buttonTitle: PropTypes.string,
|
|
86
|
-
onSubmitHandler: PropTypes.func.isRequired,
|
|
87
|
-
|
|
88
|
-
};
|
|
89
|
-
RenderInstitutionButton.defaultProps = {
|
|
90
|
-
...LogistrationDefaultProps,
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
InstitutionLogistration.propTypes = {
|
|
94
|
-
...LogistrationProps,
|
|
95
|
-
headingTitle: PropTypes.string,
|
|
96
|
-
};
|
|
97
|
-
InstitutionLogistration.defaultProps = {
|
|
98
|
-
...LogistrationDefaultProps,
|
|
99
|
-
headingTitle: '',
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export default InstitutionLogistration;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FormattedMessage } from '@openedx/frontend-base';
|
|
2
|
-
|
|
3
|
-
const NotFoundPage = () => (
|
|
4
|
-
<div className="container-fluid d-flex py-5 justify-content-center align-items-start text-center">
|
|
5
|
-
<p className="my-0 py-5 text-muted mw-32em">
|
|
6
|
-
<FormattedMessage
|
|
7
|
-
id="error.notfound.message"
|
|
8
|
-
defaultMessage="The page you're looking for is unavailable or there's an error in the URL. Please check the URL and try again."
|
|
9
|
-
description="error message when a page does not exist"
|
|
10
|
-
/>
|
|
11
|
-
</p>
|
|
12
|
-
</div>
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
export default NotFoundPage;
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
3
|
-
|
|
4
|
-
import { useIntl } from '@openedx/frontend-base';
|
|
5
|
-
import {
|
|
6
|
-
Form, Icon, IconButton, OverlayTrigger, Tooltip, useToggle,
|
|
7
|
-
} from '@openedx/paragon';
|
|
8
|
-
import {
|
|
9
|
-
Check, Remove, Visibility, VisibilityOff,
|
|
10
|
-
} from '@openedx/paragon/icons';
|
|
11
|
-
import PropTypes from 'prop-types';
|
|
12
|
-
|
|
13
|
-
import { LETTER_REGEX, NUMBER_REGEX } from '../data/constants';
|
|
14
|
-
import { clearRegistrationBackendError, fetchRealtimeValidations } from '../register/data/actions';
|
|
15
|
-
import { validatePasswordField } from '../register/data/utils';
|
|
16
|
-
import messages from './messages';
|
|
17
|
-
|
|
18
|
-
const PasswordField = (props) => {
|
|
19
|
-
const { formatMessage } = useIntl();
|
|
20
|
-
const dispatch = useDispatch();
|
|
21
|
-
|
|
22
|
-
const validationApiRateLimited = useSelector(state => state.register.validationApiRateLimited);
|
|
23
|
-
const [isPasswordHidden, setHiddenTrue, setHiddenFalse] = useToggle(true);
|
|
24
|
-
const [showTooltip, setShowTooltip] = useState(false);
|
|
25
|
-
|
|
26
|
-
const handleBlur = (e) => {
|
|
27
|
-
const { name, value } = e.target;
|
|
28
|
-
if (name === props.name && e.relatedTarget?.name === 'passwordIcon') {
|
|
29
|
-
return; // Do not run validations on password icon click
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
let passwordValue = value;
|
|
33
|
-
if (name === 'passwordIcon') {
|
|
34
|
-
// To validate actual password value when onBlur is triggered by focusing out the password icon
|
|
35
|
-
passwordValue = props.value;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (props.handleBlur) {
|
|
39
|
-
props.handleBlur({
|
|
40
|
-
target: {
|
|
41
|
-
name: props.name,
|
|
42
|
-
value: passwordValue,
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
setShowTooltip(props.showRequirements && false);
|
|
48
|
-
if (props.handleErrorChange) { // If rendering from register page
|
|
49
|
-
const fieldError = validatePasswordField(passwordValue, formatMessage);
|
|
50
|
-
if (fieldError) {
|
|
51
|
-
props.handleErrorChange('password', fieldError);
|
|
52
|
-
} else if (!validationApiRateLimited) {
|
|
53
|
-
dispatch(fetchRealtimeValidations({ password: passwordValue }));
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const handleFocus = (e) => {
|
|
59
|
-
if (e.target?.name === 'passwordIcon') {
|
|
60
|
-
return; // Do not clear error on password icon focus
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (props.handleFocus) {
|
|
64
|
-
props.handleFocus(e);
|
|
65
|
-
}
|
|
66
|
-
if (props.handleErrorChange) {
|
|
67
|
-
props.handleErrorChange('password', '');
|
|
68
|
-
dispatch(clearRegistrationBackendError('password'));
|
|
69
|
-
}
|
|
70
|
-
setTimeout(() => setShowTooltip(props.showRequirements && true), 150);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const HideButton = (
|
|
74
|
-
<IconButton
|
|
75
|
-
onFocus={handleFocus}
|
|
76
|
-
onBlur={handleBlur}
|
|
77
|
-
name="passwordIcon"
|
|
78
|
-
src={VisibilityOff}
|
|
79
|
-
iconAs={Icon}
|
|
80
|
-
onClick={setHiddenTrue}
|
|
81
|
-
size="sm"
|
|
82
|
-
variant="secondary"
|
|
83
|
-
alt={formatMessage(messages['hide.password'])}
|
|
84
|
-
/>
|
|
85
|
-
);
|
|
86
|
-
|
|
87
|
-
const ShowButton = (
|
|
88
|
-
<IconButton
|
|
89
|
-
onFocus={handleFocus}
|
|
90
|
-
onBlur={handleBlur}
|
|
91
|
-
name="passwordIcon"
|
|
92
|
-
src={Visibility}
|
|
93
|
-
iconAs={Icon}
|
|
94
|
-
onClick={setHiddenFalse}
|
|
95
|
-
size="sm"
|
|
96
|
-
variant="secondary"
|
|
97
|
-
alt={formatMessage(messages['show.password'])}
|
|
98
|
-
/>
|
|
99
|
-
);
|
|
100
|
-
|
|
101
|
-
const placement = window.innerWidth < 768 ? 'top' : 'left';
|
|
102
|
-
const tooltip = (
|
|
103
|
-
<Tooltip id={`password-requirement-${placement}`}>
|
|
104
|
-
<span id="letter-check" className="d-flex align-items-center">
|
|
105
|
-
{LETTER_REGEX.test(props.value) ? <Icon className="text-success mr-1" src={Check} /> : <Icon className="mr-1 text-light-700" src={Remove} />}
|
|
106
|
-
{formatMessage(messages['one.letter'])}
|
|
107
|
-
</span>
|
|
108
|
-
<span id="number-check" className="d-flex align-items-center">
|
|
109
|
-
{NUMBER_REGEX.test(props.value) ? <Icon className="text-success mr-1" src={Check} /> : <Icon className="mr-1 text-light-700" src={Remove} />}
|
|
110
|
-
{formatMessage(messages['one.number'])}
|
|
111
|
-
</span>
|
|
112
|
-
<span id="characters-check" className="d-flex align-items-center">
|
|
113
|
-
{props.value.length >= 8 ? <Icon className="text-success mr-1" src={Check} /> : <Icon className="mr-1 text-light-700" src={Remove} />}
|
|
114
|
-
{formatMessage(messages['eight.characters'])}
|
|
115
|
-
</span>
|
|
116
|
-
</Tooltip>
|
|
117
|
-
);
|
|
118
|
-
|
|
119
|
-
return (
|
|
120
|
-
<Form.Group controlId={props.name} isInvalid={props.errorMessage !== ''}>
|
|
121
|
-
<OverlayTrigger key="tooltip" placement={placement} overlay={tooltip} show={showTooltip}>
|
|
122
|
-
<Form.Control
|
|
123
|
-
as="input"
|
|
124
|
-
className="form-group__form-field"
|
|
125
|
-
type={isPasswordHidden ? 'password' : 'text'}
|
|
126
|
-
name={props.name}
|
|
127
|
-
value={props.value}
|
|
128
|
-
autoComplete={props.autoComplete}
|
|
129
|
-
aria-invalid={props.errorMessage !== ''}
|
|
130
|
-
onFocus={handleFocus}
|
|
131
|
-
onBlur={handleBlur}
|
|
132
|
-
onChange={props.handleChange}
|
|
133
|
-
controlClassName={props.borderClass}
|
|
134
|
-
trailingElement={isPasswordHidden ? ShowButton : HideButton}
|
|
135
|
-
floatingLabel={props.floatingLabel}
|
|
136
|
-
/>
|
|
137
|
-
</OverlayTrigger>
|
|
138
|
-
{props.errorMessage !== '' && (
|
|
139
|
-
<Form.Control.Feedback key="error" className="form-text-size" hasIcon={false} feedback-for={props.name} type="invalid">
|
|
140
|
-
{props.errorMessage}
|
|
141
|
-
{props.showScreenReaderText && <span className="sr-only">{formatMessage(messages['password.sr.only.helping.text'])}</span>}
|
|
142
|
-
</Form.Control.Feedback>
|
|
143
|
-
)}
|
|
144
|
-
</Form.Group>
|
|
145
|
-
);
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
PasswordField.defaultProps = {
|
|
149
|
-
borderClass: '',
|
|
150
|
-
errorMessage: '',
|
|
151
|
-
handleBlur: null,
|
|
152
|
-
handleFocus: null,
|
|
153
|
-
handleChange: () => {},
|
|
154
|
-
handleErrorChange: null,
|
|
155
|
-
showRequirements: true,
|
|
156
|
-
showScreenReaderText: true,
|
|
157
|
-
autoComplete: null,
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
PasswordField.propTypes = {
|
|
161
|
-
borderClass: PropTypes.string,
|
|
162
|
-
errorMessage: PropTypes.string,
|
|
163
|
-
floatingLabel: PropTypes.string.isRequired,
|
|
164
|
-
handleBlur: PropTypes.func,
|
|
165
|
-
handleFocus: PropTypes.func,
|
|
166
|
-
handleChange: PropTypes.func,
|
|
167
|
-
handleErrorChange: PropTypes.func,
|
|
168
|
-
name: PropTypes.string.isRequired,
|
|
169
|
-
showRequirements: PropTypes.bool,
|
|
170
|
-
value: PropTypes.string.isRequired,
|
|
171
|
-
autoComplete: PropTypes.string,
|
|
172
|
-
showScreenReaderText: PropTypes.bool,
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
export default PasswordField;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { useAppConfig, getSiteConfig } from '@openedx/frontend-base';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { Navigate } from 'react-router-dom';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
AUTHN_PROGRESSIVE_PROFILING, REDIRECT,
|
|
7
|
-
} from '../data/constants';
|
|
8
|
-
import { setCookie } from '../data/utils';
|
|
9
|
-
|
|
10
|
-
const RedirectLogistration = (props) => {
|
|
11
|
-
const {
|
|
12
|
-
authenticatedUser,
|
|
13
|
-
finishAuthUrl,
|
|
14
|
-
redirectUrl,
|
|
15
|
-
redirectToProgressiveProfilingPage,
|
|
16
|
-
success,
|
|
17
|
-
optionalFields,
|
|
18
|
-
educationLevel,
|
|
19
|
-
userId,
|
|
20
|
-
registrationEmbedded,
|
|
21
|
-
host,
|
|
22
|
-
} = props;
|
|
23
|
-
let finalRedirectUrl = '';
|
|
24
|
-
|
|
25
|
-
if (success) {
|
|
26
|
-
// If we're in a third party auth pipeline, we must complete the pipeline
|
|
27
|
-
// once user has successfully logged in. Otherwise, redirect to the specified redirect url.
|
|
28
|
-
// Note: For multiple enterprise use case, we need to make sure that user first visits the
|
|
29
|
-
// enterprise selection page and then complete the auth workflow
|
|
30
|
-
if (finishAuthUrl && !redirectUrl.includes(finishAuthUrl)) {
|
|
31
|
-
finalRedirectUrl = getSiteConfig().lmsBaseUrl + finishAuthUrl;
|
|
32
|
-
} else {
|
|
33
|
-
finalRedirectUrl = redirectUrl;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Redirect to Progressive Profiling after successful registration
|
|
37
|
-
if (redirectToProgressiveProfilingPage) {
|
|
38
|
-
// TODO: Do we still need this cookie?
|
|
39
|
-
setCookie('van-504-returning-user', true, useAppConfig().SESSION_COOKIE_DOMAIN);
|
|
40
|
-
|
|
41
|
-
if (registrationEmbedded) {
|
|
42
|
-
window.parent.postMessage({
|
|
43
|
-
action: REDIRECT,
|
|
44
|
-
redirectUrl: useAppConfig().POST_REGISTRATION_REDIRECT_URL,
|
|
45
|
-
}, host);
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
const registrationResult = { redirectUrl: finalRedirectUrl, success };
|
|
49
|
-
return (
|
|
50
|
-
<Navigate
|
|
51
|
-
to={AUTHN_PROGRESSIVE_PROFILING}
|
|
52
|
-
state={{
|
|
53
|
-
registrationResult,
|
|
54
|
-
optionalFields,
|
|
55
|
-
authenticatedUser,
|
|
56
|
-
}}
|
|
57
|
-
replace
|
|
58
|
-
/>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
window.location.href = finalRedirectUrl;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return null;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
RedirectLogistration.defaultProps = {
|
|
69
|
-
authenticatedUser: {},
|
|
70
|
-
educationLevel: null,
|
|
71
|
-
finishAuthUrl: null,
|
|
72
|
-
success: false,
|
|
73
|
-
redirectUrl: '',
|
|
74
|
-
redirectToProgressiveProfilingPage: false,
|
|
75
|
-
optionalFields: {},
|
|
76
|
-
userId: null,
|
|
77
|
-
registrationEmbedded: false,
|
|
78
|
-
host: '',
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
RedirectLogistration.propTypes = {
|
|
82
|
-
authenticatedUser: PropTypes.shape({}),
|
|
83
|
-
educationLevel: PropTypes.string,
|
|
84
|
-
finishAuthUrl: PropTypes.string,
|
|
85
|
-
success: PropTypes.bool,
|
|
86
|
-
redirectUrl: PropTypes.string,
|
|
87
|
-
redirectToProgressiveProfilingPage: PropTypes.bool,
|
|
88
|
-
optionalFields: PropTypes.shape({}),
|
|
89
|
-
userId: PropTypes.number,
|
|
90
|
-
registrationEmbedded: PropTypes.bool,
|
|
91
|
-
host: PropTypes.string,
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
export default RedirectLogistration;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
2
|
-
import {
|
|
3
|
-
faApple, faFacebook, faGoogle, faMicrosoft,
|
|
4
|
-
} from '@fortawesome/free-brands-svg-icons';
|
|
5
|
-
|
|
6
|
-
export default function registerIcons() {
|
|
7
|
-
library.add(faApple, faFacebook, faGoogle, faMicrosoft);
|
|
8
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
2
|
-
import { getSiteConfig, useIntl } from '@openedx/frontend-base';
|
|
3
|
-
import { Icon } from '@openedx/paragon';
|
|
4
|
-
import { Login } from '@openedx/paragon/icons';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
|
|
7
|
-
import { LOGIN_PAGE, SUPPORTED_ICON_CLASSES } from '../data/constants';
|
|
8
|
-
import messages from './messages';
|
|
9
|
-
|
|
10
|
-
const SocialAuthProviders = (props) => {
|
|
11
|
-
const { formatMessage } = useIntl();
|
|
12
|
-
const { referrer, socialAuthProviders } = props;
|
|
13
|
-
|
|
14
|
-
function handleSubmit(e) {
|
|
15
|
-
e.preventDefault();
|
|
16
|
-
|
|
17
|
-
const url = e.currentTarget.dataset.providerUrl;
|
|
18
|
-
window.location.href = getSiteConfig().lmsBaseUrl + url;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const socialAuth = socialAuthProviders.map((provider, index) => (
|
|
22
|
-
<button
|
|
23
|
-
id={provider.id}
|
|
24
|
-
key={provider.id}
|
|
25
|
-
type="button"
|
|
26
|
-
className={`btn-social btn-${provider.id} ${index % 2 === 0 ? 'mr-3' : ''}`}
|
|
27
|
-
data-provider-url={referrer === LOGIN_PAGE ? provider.loginUrl : provider.registerUrl}
|
|
28
|
-
onClick={handleSubmit}
|
|
29
|
-
>
|
|
30
|
-
{provider.iconImage ? (
|
|
31
|
-
<div aria-hidden="true">
|
|
32
|
-
<img className="btn-tpa__image-icon" src={provider.iconImage} alt={`icon ${provider.name}`} />
|
|
33
|
-
</div>
|
|
34
|
-
)
|
|
35
|
-
: (
|
|
36
|
-
<div className="btn-tpa__font-container" aria-hidden="true">
|
|
37
|
-
{SUPPORTED_ICON_CLASSES.includes(provider.iconClass) ? (
|
|
38
|
-
<FontAwesomeIcon icon={['fab', provider.iconClass]} />)
|
|
39
|
-
: (
|
|
40
|
-
<Icon className="h-75" src={Login} />
|
|
41
|
-
)}
|
|
42
|
-
</div>
|
|
43
|
-
)}
|
|
44
|
-
<span id="provider-name" className="notranslate mr-auto pl-2" aria-hidden="true">{provider.name}</span>
|
|
45
|
-
<span className="sr-only">
|
|
46
|
-
{referrer === LOGIN_PAGE
|
|
47
|
-
? formatMessage(messages['sso.sign.in.with'], { providerName: provider.name })
|
|
48
|
-
: formatMessage(messages['sso.create.account.using'], { providerName: provider.name })}
|
|
49
|
-
</span>
|
|
50
|
-
</button>
|
|
51
|
-
));
|
|
52
|
-
|
|
53
|
-
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
54
|
-
return <>{socialAuth}</>;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
SocialAuthProviders.defaultProps = {
|
|
58
|
-
referrer: LOGIN_PAGE,
|
|
59
|
-
socialAuthProviders: [],
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
SocialAuthProviders.propTypes = {
|
|
63
|
-
referrer: PropTypes.string,
|
|
64
|
-
socialAuthProviders: PropTypes.arrayOf(PropTypes.shape({
|
|
65
|
-
id: PropTypes.string,
|
|
66
|
-
name: PropTypes.string,
|
|
67
|
-
iconClass: PropTypes.string,
|
|
68
|
-
iconImage: PropTypes.string,
|
|
69
|
-
loginUrl: PropTypes.string,
|
|
70
|
-
registerUrl: PropTypes.string,
|
|
71
|
-
skipRegistrationForm: PropTypes.bool,
|
|
72
|
-
})),
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export default SocialAuthProviders;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { useAppConfig, getSiteConfig, useIntl } from '@openedx/frontend-base';
|
|
2
|
-
import {
|
|
3
|
-
Hyperlink, Icon,
|
|
4
|
-
} from '@openedx/paragon';
|
|
5
|
-
import { Institution } from '@openedx/paragon/icons';
|
|
6
|
-
import classNames from 'classnames';
|
|
7
|
-
import PropTypes from 'prop-types';
|
|
8
|
-
import Skeleton from 'react-loading-skeleton';
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
ENTERPRISE_LOGIN_URL, LOGIN_PAGE, PENDING_STATE, REGISTER_PAGE,
|
|
12
|
-
} from '../data/constants';
|
|
13
|
-
import messages from './messages';
|
|
14
|
-
|
|
15
|
-
import {
|
|
16
|
-
RenderInstitutionButton,
|
|
17
|
-
SocialAuthProviders,
|
|
18
|
-
} from './index';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* This component renders the Single sign-on (SSO) buttons for the providers passed.
|
|
22
|
-
* */
|
|
23
|
-
const ThirdPartyAuth = (props) => {
|
|
24
|
-
const { formatMessage } = useIntl();
|
|
25
|
-
const {
|
|
26
|
-
providers,
|
|
27
|
-
secondaryProviders,
|
|
28
|
-
currentProvider,
|
|
29
|
-
handleInstitutionLogin,
|
|
30
|
-
thirdPartyAuthApiStatus,
|
|
31
|
-
isLoginPage,
|
|
32
|
-
} = props;
|
|
33
|
-
const isInstitutionAuthActive = !!secondaryProviders.length && !currentProvider;
|
|
34
|
-
const isSocialAuthActive = !!providers.length && !currentProvider;
|
|
35
|
-
const isEnterpriseLoginDisabled = useAppConfig().DISABLE_ENTERPRISE_LOGIN;
|
|
36
|
-
const enterpriseLoginURL = getSiteConfig().lmsBaseUrl + ENTERPRISE_LOGIN_URL;
|
|
37
|
-
const isThirdPartyAuthActive = isSocialAuthActive || (isEnterpriseLoginDisabled && isInstitutionAuthActive);
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<>
|
|
41
|
-
{((isEnterpriseLoginDisabled && isInstitutionAuthActive) || isSocialAuthActive) && (
|
|
42
|
-
<div className="mt-4 mb-3 h4">
|
|
43
|
-
{isLoginPage
|
|
44
|
-
? formatMessage(messages['login.other.options.heading'])
|
|
45
|
-
: formatMessage(messages['registration.other.options.heading'])}
|
|
46
|
-
</div>
|
|
47
|
-
)}
|
|
48
|
-
{(isLoginPage && !isEnterpriseLoginDisabled && isSocialAuthActive) && (
|
|
49
|
-
<Hyperlink
|
|
50
|
-
className={classNames(
|
|
51
|
-
'btn btn-link btn-sm text-body p-0',
|
|
52
|
-
{ 'mb-0': thirdPartyAuthApiStatus === PENDING_STATE },
|
|
53
|
-
{ 'mb-4': thirdPartyAuthApiStatus !== PENDING_STATE },
|
|
54
|
-
)}
|
|
55
|
-
destination={enterpriseLoginURL}
|
|
56
|
-
>
|
|
57
|
-
<Icon src={Institution} className="institute-icon" />
|
|
58
|
-
{formatMessage(messages['enterprise.login.btn.text'])}
|
|
59
|
-
</Hyperlink>
|
|
60
|
-
)}
|
|
61
|
-
|
|
62
|
-
{thirdPartyAuthApiStatus === PENDING_STATE && isThirdPartyAuthActive ? (
|
|
63
|
-
<div className="mt-4">
|
|
64
|
-
<Skeleton className="tpa-skeleton" height={36} count={2} />
|
|
65
|
-
</div>
|
|
66
|
-
) : (
|
|
67
|
-
<>
|
|
68
|
-
{(isEnterpriseLoginDisabled && isInstitutionAuthActive) && (
|
|
69
|
-
<RenderInstitutionButton
|
|
70
|
-
onSubmitHandler={handleInstitutionLogin}
|
|
71
|
-
buttonTitle={formatMessage(messages['institution.login.button'])}
|
|
72
|
-
/>
|
|
73
|
-
)}
|
|
74
|
-
{isSocialAuthActive && (
|
|
75
|
-
<div className="row m-0">
|
|
76
|
-
<SocialAuthProviders
|
|
77
|
-
socialAuthProviders={providers}
|
|
78
|
-
referrer={isLoginPage ? LOGIN_PAGE : REGISTER_PAGE}
|
|
79
|
-
/>
|
|
80
|
-
</div>
|
|
81
|
-
)}
|
|
82
|
-
</>
|
|
83
|
-
)}
|
|
84
|
-
</>
|
|
85
|
-
);
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
ThirdPartyAuth.defaultProps = {
|
|
89
|
-
currentProvider: null,
|
|
90
|
-
providers: [],
|
|
91
|
-
secondaryProviders: [],
|
|
92
|
-
thirdPartyAuthApiStatus: PENDING_STATE,
|
|
93
|
-
isLoginPage: false,
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
ThirdPartyAuth.propTypes = {
|
|
97
|
-
currentProvider: PropTypes.string,
|
|
98
|
-
handleInstitutionLogin: PropTypes.func.isRequired,
|
|
99
|
-
providers: PropTypes.arrayOf(
|
|
100
|
-
PropTypes.shape({
|
|
101
|
-
id: PropTypes.string,
|
|
102
|
-
name: PropTypes.string,
|
|
103
|
-
iconClass: PropTypes.string,
|
|
104
|
-
iconImage: PropTypes.string,
|
|
105
|
-
loginUrl: PropTypes.string,
|
|
106
|
-
registerUrl: PropTypes.string,
|
|
107
|
-
}),
|
|
108
|
-
),
|
|
109
|
-
secondaryProviders: PropTypes.arrayOf(
|
|
110
|
-
PropTypes.shape({
|
|
111
|
-
id: PropTypes.string,
|
|
112
|
-
name: PropTypes.string,
|
|
113
|
-
iconClass: PropTypes.string,
|
|
114
|
-
iconImage: PropTypes.string,
|
|
115
|
-
loginUrl: PropTypes.string,
|
|
116
|
-
registerUrl: PropTypes.string,
|
|
117
|
-
}),
|
|
118
|
-
),
|
|
119
|
-
thirdPartyAuthApiStatus: PropTypes.string,
|
|
120
|
-
isLoginPage: PropTypes.bool,
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
export default ThirdPartyAuth;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { getSiteConfig, useIntl } from '@openedx/frontend-base';
|
|
2
|
-
import { Alert } from '@openedx/paragon';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
|
|
5
|
-
import { LOGIN_PAGE, REGISTER_PAGE } from '../data/constants';
|
|
6
|
-
import messages from './messages';
|
|
7
|
-
|
|
8
|
-
const ThirdPartyAuthAlert = (props) => {
|
|
9
|
-
const { formatMessage } = useIntl();
|
|
10
|
-
const { currentProvider, referrer } = props;
|
|
11
|
-
const platformName = getSiteConfig().siteName;
|
|
12
|
-
let message;
|
|
13
|
-
|
|
14
|
-
if (referrer === LOGIN_PAGE) {
|
|
15
|
-
message = formatMessage(messages['login.third.party.auth.account.not.linked'], { currentProvider, platformName });
|
|
16
|
-
} else {
|
|
17
|
-
message = formatMessage(messages['register.third.party.auth.account.not.linked'], { currentProvider, platformName });
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if (!currentProvider) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<>
|
|
26
|
-
<Alert id="tpa-alert" className={referrer === REGISTER_PAGE ? 'alert-success mt-n2 mb-5' : 'alert-warning mt-n2 mb-5'}>
|
|
27
|
-
{referrer === REGISTER_PAGE ? (
|
|
28
|
-
<Alert.Heading>{formatMessage(messages['tpa.alert.heading'])}</Alert.Heading>
|
|
29
|
-
) : null}
|
|
30
|
-
<p>{message}</p>
|
|
31
|
-
</Alert>
|
|
32
|
-
{referrer === REGISTER_PAGE ? (
|
|
33
|
-
<h4 className="mt-4 mb-4">{formatMessage(messages['registration.using.tpa.form.heading'])}</h4>
|
|
34
|
-
) : null}
|
|
35
|
-
</>
|
|
36
|
-
);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
ThirdPartyAuthAlert.defaultProps = {
|
|
40
|
-
currentProvider: '',
|
|
41
|
-
referrer: LOGIN_PAGE,
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
ThirdPartyAuthAlert.propTypes = {
|
|
45
|
-
currentProvider: PropTypes.string,
|
|
46
|
-
referrer: PropTypes.string,
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export default ThirdPartyAuthAlert;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
|
|
3
|
-
import { fetchAuthenticatedUser, getAuthenticatedUser, getSiteConfig } from '@openedx/frontend-base';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
DEFAULT_REDIRECT_URL,
|
|
8
|
-
} from '../data/constants';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* This wrapper redirects the requester to our default redirect url if they are
|
|
12
|
-
* already authenticated.
|
|
13
|
-
*/
|
|
14
|
-
const UnAuthOnlyRoute = ({ children }) => {
|
|
15
|
-
const [authUser, setAuthUser] = useState({});
|
|
16
|
-
const [isReady, setIsReady] = useState(false);
|
|
17
|
-
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
fetchAuthenticatedUser({ forceRefresh: !!getAuthenticatedUser() }).then((authenticatedUser) => {
|
|
20
|
-
setAuthUser(authenticatedUser);
|
|
21
|
-
setIsReady(true);
|
|
22
|
-
});
|
|
23
|
-
}, []);
|
|
24
|
-
|
|
25
|
-
if (isReady) {
|
|
26
|
-
if (authUser && authUser.username) {
|
|
27
|
-
global.location.href = getSiteConfig().lmsBaseUrl.concat(DEFAULT_REDIRECT_URL);
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return children;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return null;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
UnAuthOnlyRoute.propTypes = {
|
|
38
|
-
children: PropTypes.node.isRequired,
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export default UnAuthOnlyRoute;
|