@openedx/frontend-app-authn 1.0.0-alpha.6 → 1.0.0-alpha.8
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.js +1 -3
- package/dist/Main.js.map +1 -1
- package/dist/app.js +0 -2
- package/dist/app.js.map +1 -1
- package/dist/common-components/EmbeddedRegistrationRoute.js +2 -2
- package/dist/common-components/EmbeddedRegistrationRoute.js.map +1 -1
- package/dist/common-components/EnterpriseSSO.js +6 -3
- package/dist/common-components/EnterpriseSSO.js.map +1 -1
- package/dist/common-components/PasswordField.d.ts +17 -9
- package/dist/common-components/PasswordField.js +10 -6
- package/dist/common-components/PasswordField.js.map +1 -1
- package/dist/common-components/RedirectLogistration.js +7 -3
- package/dist/common-components/RedirectLogistration.js.map +1 -1
- package/dist/common-components/SocialAuthProviders.d.ts +2 -2
- package/dist/common-components/SocialAuthProviders.js +5 -4
- package/dist/common-components/SocialAuthProviders.js.map +1 -1
- package/dist/common-components/ThirdPartyAuth.js +3 -2
- package/dist/common-components/ThirdPartyAuth.js.map +1 -1
- package/dist/common-components/ThirdPartyAuthAlert.d.ts +2 -2
- package/dist/common-components/ThirdPartyAuthAlert.js +4 -4
- package/dist/common-components/ThirdPartyAuthAlert.js.map +1 -1
- package/dist/common-components/UnAuthOnlyRoute.js +5 -4
- package/dist/common-components/UnAuthOnlyRoute.js.map +1 -1
- package/dist/common-components/components/ThirdPartyAuthContext.d.ts +31 -0
- package/dist/common-components/components/ThirdPartyAuthContext.js +84 -0
- package/dist/common-components/components/ThirdPartyAuthContext.js.map +1 -0
- package/dist/common-components/data/api.d.ts +6 -0
- package/dist/common-components/data/api.js +26 -0
- package/dist/common-components/data/api.js.map +1 -0
- package/dist/common-components/data/apiHook.d.ts +9 -0
- package/dist/common-components/data/apiHook.js +14 -0
- package/dist/common-components/data/apiHook.js.map +1 -0
- package/dist/common-components/data/queryKeys.d.ts +4 -0
- package/dist/common-components/data/queryKeys.js +6 -0
- package/dist/common-components/data/queryKeys.js.map +1 -0
- package/dist/common-components/index.d.ts +0 -3
- package/dist/common-components/index.js +0 -3
- package/dist/common-components/index.js.map +1 -1
- package/dist/constants.d.ts +13 -0
- package/dist/constants.js +15 -0
- package/dist/constants.js.map +1 -1
- package/dist/data/constants.d.ts +0 -8
- package/dist/data/constants.js +0 -9
- package/dist/data/constants.js.map +1 -1
- package/dist/data/utils/dataUtils.d.ts +1 -0
- package/dist/data/utils/dataUtils.js +14 -0
- package/dist/data/utils/dataUtils.js.map +1 -1
- package/dist/data/utils/index.d.ts +1 -2
- package/dist/data/utils/index.js +1 -2
- package/dist/data/utils/index.js.map +1 -1
- package/dist/forgot-password/ForgotPasswordPage.d.ts +2 -36
- package/dist/forgot-password/ForgotPasswordPage.js +45 -44
- package/dist/forgot-password/ForgotPasswordPage.js.map +1 -1
- package/dist/forgot-password/data/api.d.ts +2 -0
- package/dist/forgot-password/data/{service.js → api.js} +13 -14
- package/dist/forgot-password/data/api.js.map +1 -0
- package/dist/forgot-password/data/apiHook.d.ts +16 -0
- package/dist/forgot-password/data/apiHook.js +26 -0
- package/dist/forgot-password/data/apiHook.js.map +1 -0
- package/dist/forgot-password/index.d.ts +0 -4
- package/dist/forgot-password/index.js +0 -4
- package/dist/forgot-password/index.js.map +1 -1
- package/dist/forgot-password/messages.js +1 -1
- package/dist/forgot-password/messages.js.map +1 -1
- package/dist/i18n/index.d.ts +1 -25
- package/dist/i18n/index.js +1 -25
- package/dist/i18n/index.js.map +1 -1
- package/dist/login/ChangePasswordPrompt.js +11 -5
- package/dist/login/ChangePasswordPrompt.js.map +1 -1
- package/dist/login/LoginPage.d.ts +12 -10
- package/dist/login/LoginPage.js +85 -127
- package/dist/login/LoginPage.js.map +1 -1
- package/dist/login/components/LoginContext.d.ts +21 -0
- package/dist/login/components/LoginContext.js +28 -0
- package/dist/login/components/LoginContext.js.map +1 -0
- package/dist/login/data/api.d.ts +2 -0
- package/dist/login/data/api.js +27 -0
- package/dist/login/data/api.js.map +1 -0
- package/dist/login/data/apiHook.d.ts +13 -0
- package/dist/login/data/apiHook.js +57 -0
- package/dist/login/data/apiHook.js.map +1 -0
- package/dist/login/index.d.ts +0 -3
- package/dist/login/index.js +0 -3
- package/dist/login/index.js.map +1 -1
- package/dist/logistration/Logistration.d.ts +5 -32
- package/dist/logistration/Logistration.js +28 -54
- package/dist/logistration/Logistration.js.map +1 -1
- package/dist/progressive-profiling/ProgressiveProfiling.d.ts +2 -46
- package/dist/progressive-profiling/ProgressiveProfiling.js +47 -71
- package/dist/progressive-profiling/ProgressiveProfiling.js.map +1 -1
- package/dist/progressive-profiling/ProgressiveProfilingPageModal.js +8 -1
- package/dist/progressive-profiling/ProgressiveProfilingPageModal.js.map +1 -1
- package/dist/progressive-profiling/components/ProgressiveProfilingContext.d.ts +18 -0
- package/dist/progressive-profiling/components/ProgressiveProfilingContext.js +52 -0
- package/dist/progressive-profiling/components/ProgressiveProfilingContext.js.map +1 -0
- package/dist/progressive-profiling/data/api.d.ts +2 -0
- package/dist/progressive-profiling/data/{service.js → api.js} +11 -12
- package/dist/progressive-profiling/data/api.js.map +1 -0
- package/dist/progressive-profiling/data/apiHook.d.ts +10 -0
- package/dist/progressive-profiling/data/apiHook.js +36 -0
- package/dist/progressive-profiling/data/apiHook.js.map +1 -0
- package/dist/progressive-profiling/index.d.ts +0 -2
- package/dist/progressive-profiling/index.js +0 -2
- package/dist/progressive-profiling/index.js.map +1 -1
- package/dist/register/RegistrationFields/CountryField/CountryField.d.ts +1 -1
- package/dist/register/RegistrationFields/CountryField/CountryField.js +5 -7
- package/dist/register/RegistrationFields/CountryField/CountryField.js.map +1 -1
- package/dist/register/RegistrationFields/EmailField/EmailField.js +17 -9
- package/dist/register/RegistrationFields/EmailField/EmailField.js.map +1 -1
- package/dist/register/RegistrationFields/NameField/NameField.js +14 -7
- package/dist/register/RegistrationFields/NameField/NameField.js.map +1 -1
- package/dist/register/RegistrationFields/NameField/validator.d.ts +1 -0
- package/dist/register/RegistrationFields/NameField/validator.js +4 -0
- package/dist/register/RegistrationFields/NameField/validator.js.map +1 -1
- package/dist/register/RegistrationFields/UsernameField/UsernameField.js +20 -14
- package/dist/register/RegistrationFields/UsernameField/UsernameField.js.map +1 -1
- package/dist/register/RegistrationPage.d.ts +1 -1
- package/dist/register/RegistrationPage.js +102 -59
- package/dist/register/RegistrationPage.js.map +1 -1
- package/dist/register/components/RegisterContext.d.ts +8 -0
- package/dist/register/components/RegisterContext.js +167 -0
- package/dist/register/components/RegisterContext.js.map +1 -0
- package/dist/register/components/RegistrationFailure.js +4 -1
- package/dist/register/components/RegistrationFailure.js.map +1 -1
- package/dist/register/data/api.d.ts +9 -0
- package/dist/register/data/api.js +45 -0
- package/dist/register/data/api.js.map +1 -0
- package/dist/register/data/apiHook.d.ts +33 -0
- package/dist/register/data/apiHook.js +66 -0
- package/dist/register/data/apiHook.js.map +1 -0
- package/dist/register/data/constants.d.ts +1 -0
- package/dist/register/data/constants.js +1 -0
- package/dist/register/data/constants.js.map +1 -1
- package/dist/register/index.d.ts +0 -2
- package/dist/register/index.js +0 -3
- package/dist/register/index.js.map +1 -1
- package/dist/register/messages.d.ts +10 -0
- package/dist/register/messages.js +10 -0
- package/dist/register/messages.js.map +1 -1
- package/dist/register/types.d.ts +74 -0
- package/dist/register/types.js +2 -0
- package/dist/register/types.js.map +1 -0
- package/dist/reset-password/ResetPasswordPage.d.ts +2 -32
- package/dist/reset-password/ResetPasswordPage.js +90 -58
- package/dist/reset-password/ResetPasswordPage.js.map +1 -1
- package/dist/reset-password/data/api.d.ts +4 -0
- package/dist/reset-password/data/api.js +57 -0
- package/dist/reset-password/data/api.js.map +1 -0
- package/dist/reset-password/data/apiHook.d.ts +31 -0
- package/dist/reset-password/data/apiHook.js +74 -0
- package/dist/reset-password/data/apiHook.js.map +1 -0
- package/dist/reset-password/index.d.ts +0 -4
- package/dist/reset-password/index.js +0 -4
- package/dist/reset-password/index.js.map +1 -1
- package/dist/routes.d.ts +1 -0
- package/dist/routes.js +15 -14
- package/dist/routes.js.map +1 -1
- package/dist/sass/_registration.scss +8 -10
- package/dist/slots/LoginComponentSlot/index.d.ts +12 -0
- package/dist/slots/LoginComponentSlot/index.js +11 -0
- package/dist/slots/LoginComponentSlot/index.js.map +1 -0
- package/package.json +25 -14
- package/dist/common-components/data/actions.d.ts +0 -26
- package/dist/common-components/data/actions.js +0 -22
- package/dist/common-components/data/actions.js.map +0 -1
- package/dist/common-components/data/reducers.d.ts +0 -62
- package/dist/common-components/data/reducers.js +0 -39
- package/dist/common-components/data/reducers.js.map +0 -1
- package/dist/common-components/data/sagas.d.ts +0 -12
- package/dist/common-components/data/sagas.js +0 -21
- package/dist/common-components/data/sagas.js.map +0 -1
- package/dist/common-components/data/selectors.d.ts +0 -98
- package/dist/common-components/data/selectors.js +0 -11
- package/dist/common-components/data/selectors.js.map +0 -1
- package/dist/common-components/data/service.d.ts +0 -5
- package/dist/common-components/data/service.js +0 -31
- package/dist/common-components/data/service.js.map +0 -1
- package/dist/data/configureStore.d.ts +0 -3
- package/dist/data/configureStore.js +0 -24
- package/dist/data/configureStore.js.map +0 -1
- package/dist/data/reducers.d.ts +0 -254
- package/dist/data/reducers.js +0 -17
- package/dist/data/reducers.js.map +0 -1
- package/dist/data/sagas.d.ts +0 -1
- package/dist/data/sagas.js +0 -18
- package/dist/data/sagas.js.map +0 -1
- package/dist/data/utils/reduxUtils.d.ts +0 -15
- package/dist/data/utils/reduxUtils.js +0 -29
- package/dist/data/utils/reduxUtils.js.map +0 -1
- package/dist/forgot-password/data/actions.d.ts +0 -30
- package/dist/forgot-password/data/actions.js +0 -26
- package/dist/forgot-password/data/actions.js.map +0 -1
- package/dist/forgot-password/data/reducers.d.ts +0 -13
- package/dist/forgot-password/data/reducers.js +0 -46
- package/dist/forgot-password/data/reducers.js.map +0 -1
- package/dist/forgot-password/data/sagas.d.ts +0 -4
- package/dist/forgot-password/data/sagas.js +0 -28
- package/dist/forgot-password/data/sagas.js.map +0 -1
- package/dist/forgot-password/data/selectors.d.ts +0 -23
- package/dist/forgot-password/data/selectors.js +0 -5
- package/dist/forgot-password/data/selectors.js.map +0 -1
- package/dist/forgot-password/data/service.d.ts +0 -1
- package/dist/forgot-password/data/service.js.map +0 -1
- package/dist/login/data/actions.d.ts +0 -36
- package/dist/login/data/actions.js +0 -32
- package/dist/login/data/actions.js.map +0 -1
- package/dist/login/data/reducers.d.ts +0 -82
- package/dist/login/data/reducers.js +0 -44
- package/dist/login/data/reducers.js.map +0 -1
- package/dist/login/data/sagas.d.ts +0 -10
- package/dist/login/data/sagas.js +0 -34
- package/dist/login/data/sagas.js.map +0 -1
- package/dist/login/data/service.d.ts +0 -4
- package/dist/login/data/service.js +0 -32
- package/dist/login/data/service.js.map +0 -1
- package/dist/progressive-profiling/data/actions.d.ts +0 -19
- package/dist/progressive-profiling/data/actions.js +0 -18
- package/dist/progressive-profiling/data/actions.js.map +0 -1
- package/dist/progressive-profiling/data/reducers.d.ts +0 -22
- package/dist/progressive-profiling/data/reducers.js +0 -23
- package/dist/progressive-profiling/data/reducers.js.map +0 -1
- package/dist/progressive-profiling/data/sagas.d.ts +0 -4
- package/dist/progressive-profiling/data/sagas.js +0 -17
- package/dist/progressive-profiling/data/sagas.js.map +0 -1
- package/dist/progressive-profiling/data/selectors.d.ts +0 -39
- package/dist/progressive-profiling/data/selectors.js +0 -9
- package/dist/progressive-profiling/data/selectors.js.map +0 -1
- package/dist/progressive-profiling/data/service.d.ts +0 -1
- package/dist/progressive-profiling/data/service.js.map +0 -1
- package/dist/register/data/actions.d.ts +0 -80
- package/dist/register/data/actions.js +0 -69
- package/dist/register/data/actions.js.map +0 -1
- package/dist/register/data/reducers.d.ts +0 -237
- package/dist/register/data/reducers.js +0 -86
- package/dist/register/data/reducers.js.map +0 -1
- package/dist/register/data/sagas.d.ts +0 -19
- package/dist/register/data/sagas.js +0 -45
- package/dist/register/data/sagas.js.map +0 -1
- package/dist/register/data/selectors.d.ts +0 -26
- package/dist/register/data/selectors.js +0 -25
- package/dist/register/data/selectors.js.map +0 -1
- package/dist/register/data/service.d.ts +0 -8
- package/dist/register/data/service.js +0 -46
- package/dist/register/data/service.js.map +0 -1
- package/dist/reset-password/data/actions.d.ts +0 -56
- package/dist/reset-password/data/actions.js +0 -41
- package/dist/reset-password/data/actions.js.map +0 -1
- package/dist/reset-password/data/reducers.d.ts +0 -19
- package/dist/reset-password/data/reducers.js +0 -25
- package/dist/reset-password/data/reducers.js.map +0 -1
- package/dist/reset-password/data/sagas.d.ts +0 -7
- package/dist/reset-password/data/sagas.js +0 -63
- package/dist/reset-password/data/sagas.js.map +0 -1
- package/dist/reset-password/data/selectors.d.ts +0 -23
- package/dist/reset-password/data/selectors.js +0 -5
- package/dist/reset-password/data/selectors.js.map +0 -1
- package/dist/reset-password/data/service.d.ts +0 -3
- package/dist/reset-password/data/service.js +0 -62
- package/dist/reset-password/data/service.js.map +0 -1
package/dist/routes.d.ts
CHANGED
package/dist/routes.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
import { EmbeddedRegistrationRoute, NotFoundPage, UnAuthOnlyRoute } from './common-components';
|
|
12
|
-
import {
|
|
12
|
+
import { confirmPasswordRole, loginPath, loginRole, notFoundPath, passwordResetConfirmPath, registerEmbeddedPath, registerPath, registerRole, resetPath, resetPasswordRole, welcomePath, welcomeRole, } from './constants';
|
|
13
13
|
import { ForgotPasswordPage } from './forgot-password';
|
|
14
14
|
import Logistration from './logistration/Logistration';
|
|
15
15
|
import { ProgressiveProfiling } from './progressive-profiling';
|
|
@@ -18,6 +18,7 @@ import { ResetPasswordPage } from './reset-password';
|
|
|
18
18
|
const routes = [
|
|
19
19
|
{
|
|
20
20
|
id: 'org.openedx.frontend.route.authn.main',
|
|
21
|
+
path: '/authn',
|
|
21
22
|
lazy() {
|
|
22
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
24
|
const module = yield import('./Main');
|
|
@@ -26,46 +27,46 @@ const routes = [
|
|
|
26
27
|
},
|
|
27
28
|
children: [
|
|
28
29
|
{
|
|
29
|
-
path:
|
|
30
|
+
path: registerEmbeddedPath,
|
|
30
31
|
element: (_jsx(EmbeddedRegistrationRoute, { children: _jsx(RegistrationPage, {}) })),
|
|
31
32
|
},
|
|
32
33
|
{
|
|
33
|
-
path:
|
|
34
|
+
path: loginPath,
|
|
34
35
|
handle: {
|
|
35
|
-
role:
|
|
36
|
+
role: loginRole,
|
|
36
37
|
},
|
|
37
|
-
element: (_jsx(UnAuthOnlyRoute, { children: _jsx(Logistration, { selectedPage:
|
|
38
|
+
element: (_jsx(UnAuthOnlyRoute, { children: _jsx(Logistration, { selectedPage: loginPath }) })),
|
|
38
39
|
},
|
|
39
40
|
{
|
|
40
|
-
path:
|
|
41
|
+
path: registerPath,
|
|
41
42
|
handle: {
|
|
42
|
-
role:
|
|
43
|
+
role: registerRole,
|
|
43
44
|
},
|
|
44
45
|
element: (_jsx(UnAuthOnlyRoute, { children: _jsx(Logistration, {}) })),
|
|
45
46
|
},
|
|
46
47
|
{
|
|
47
|
-
path:
|
|
48
|
+
path: resetPath,
|
|
48
49
|
handle: {
|
|
49
|
-
role:
|
|
50
|
+
role: resetPasswordRole,
|
|
50
51
|
},
|
|
51
52
|
element: (_jsx(UnAuthOnlyRoute, { children: _jsx(ForgotPasswordPage, {}) })),
|
|
52
53
|
},
|
|
53
54
|
{
|
|
54
|
-
path:
|
|
55
|
+
path: `${passwordResetConfirmPath}/:token`,
|
|
55
56
|
handle: {
|
|
56
|
-
role:
|
|
57
|
+
role: confirmPasswordRole,
|
|
57
58
|
},
|
|
58
59
|
element: (_jsx(ResetPasswordPage, {})),
|
|
59
60
|
},
|
|
60
61
|
{
|
|
61
|
-
path:
|
|
62
|
+
path: welcomePath,
|
|
62
63
|
handle: {
|
|
63
|
-
role:
|
|
64
|
+
role: welcomeRole,
|
|
64
65
|
},
|
|
65
66
|
element: (_jsx(ProgressiveProfiling, {})),
|
|
66
67
|
},
|
|
67
68
|
{
|
|
68
|
-
path:
|
|
69
|
+
path: notFoundPath,
|
|
69
70
|
element: (_jsx(NotFoundPage, {})),
|
|
70
71
|
},
|
|
71
72
|
]
|
package/dist/routes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../src/routes.jsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../src/routes.jsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EACL,mBAAmB,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EACvD,wBAAwB,EAAE,oBAAoB,EAAE,YAAY,EAAE,YAAY,EAC1E,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,GACvD,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,YAAY,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,MAAM,GAAG;IACb;QACE,EAAE,EAAE,uCAAuC;QAC3C,IAAI,EAAE,QAAQ;QACR,IAAI;;gBACR,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACtC,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;YACvC,CAAC;SAAA;QACD,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,oBAAoB;gBAC1B,OAAO,EAAE,CACP,KAAC,yBAAyB,cAAC,KAAC,gBAAgB,KAAG,GAA4B,CAC5E;aACF;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE;oBACN,IAAI,EAAE,SAAS;iBAChB;gBACD,OAAO,EAAE,CACP,KAAC,eAAe,cAAC,KAAC,YAAY,IAAC,YAAY,EAAE,SAAS,GAAI,GAAkB,CAC7E;aACF;YACD;gBACE,IAAI,EAAE,YAAY;gBAClB,MAAM,EAAE;oBACN,IAAI,EAAE,YAAY;iBACnB;gBACD,OAAO,EAAE,CACP,KAAC,eAAe,cAAC,KAAC,YAAY,KAAG,GAAkB,CACpD;aACF;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE;oBACN,IAAI,EAAE,iBAAiB;iBACxB;gBACD,OAAO,EAAE,CACP,KAAC,eAAe,cAAC,KAAC,kBAAkB,KAAG,GAAkB,CAC1D;aACF;YACD;gBACE,IAAI,EAAE,GAAG,wBAAwB,SAAS;gBAC1C,MAAM,EAAE;oBACN,IAAI,EAAE,mBAAmB;iBAC1B;gBACD,OAAO,EAAE,CACP,KAAC,iBAAiB,KAAG,CACtB;aACF;YACD;gBACE,IAAI,EAAE,WAAW;gBACjB,MAAM,EAAE;oBACN,IAAI,EAAE,WAAW;iBAClB;gBACD,OAAO,EAAE,CACP,KAAC,oBAAoB,KAAG,CACzB;aACF;YACD;gBACE,IAAI,EAAE,YAAY;gBAClB,OAAO,EAAE,CACP,KAAC,YAAY,KAAG,CACjB;aACF;SACF;KACF;CACF,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import { EmbeddedRegistrationRoute, NotFoundPage, UnAuthOnlyRoute } from './common-components';\nimport {\n confirmPasswordRole, loginPath, loginRole, notFoundPath,\n passwordResetConfirmPath, registerEmbeddedPath, registerPath, registerRole,\n resetPath, resetPasswordRole, welcomePath, welcomeRole,\n} from './constants';\nimport { ForgotPasswordPage } from './forgot-password';\nimport Logistration from './logistration/Logistration';\nimport { ProgressiveProfiling } from './progressive-profiling';\nimport { RegistrationPage } from './register';\nimport { ResetPasswordPage } from './reset-password';\n\nconst routes = [\n {\n id: 'org.openedx.frontend.route.authn.main',\n path: '/authn',\n async lazy() {\n const module = await import('./Main');\n return { Component: module.default };\n },\n children: [\n {\n path: registerEmbeddedPath,\n element: (\n <EmbeddedRegistrationRoute><RegistrationPage /></EmbeddedRegistrationRoute>\n ),\n },\n {\n path: loginPath,\n handle: {\n role: loginRole,\n },\n element: (\n <UnAuthOnlyRoute><Logistration selectedPage={loginPath} /></UnAuthOnlyRoute>\n ),\n },\n {\n path: registerPath,\n handle: {\n role: registerRole,\n },\n element: (\n <UnAuthOnlyRoute><Logistration /></UnAuthOnlyRoute>\n ),\n },\n {\n path: resetPath,\n handle: {\n role: resetPasswordRole,\n },\n element: (\n <UnAuthOnlyRoute><ForgotPasswordPage /></UnAuthOnlyRoute>\n ),\n },\n {\n path: `${passwordResetConfirmPath}/:token`,\n handle: {\n role: confirmPasswordRole,\n },\n element: (\n <ResetPasswordPage />\n ),\n },\n {\n path: welcomePath,\n handle: {\n role: welcomeRole,\n },\n element: (\n <ProgressiveProfiling />\n ),\n },\n {\n path: notFoundPath,\n element: (\n <NotFoundPage />\n ),\n },\n ]\n }\n];\n\nexport default routes;\n"]}
|
|
@@ -68,22 +68,20 @@
|
|
|
68
68
|
margin-right: 0.25rem;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
.
|
|
71
|
+
.username__form-group-wrapper {
|
|
72
72
|
position: relative;
|
|
73
|
-
margin-top: -2.5rem;
|
|
74
|
-
margin-left: 15px;
|
|
75
73
|
}
|
|
76
74
|
|
|
77
|
-
.username-
|
|
78
|
-
right: 1rem;
|
|
75
|
+
.username-suggestions {
|
|
79
76
|
position: absolute;
|
|
77
|
+
inset: 0;
|
|
78
|
+
padding-left: 15px;
|
|
79
|
+
z-index: 100;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
.username-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
margin-bottom: 11%;
|
|
86
|
-
margin-left: 15px;
|
|
82
|
+
.username-suggestions__close__button {
|
|
83
|
+
right: 1rem;
|
|
84
|
+
position: absolute;
|
|
87
85
|
}
|
|
88
86
|
|
|
89
87
|
.username-scroll-suggested--form-field {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default LoginComponentSlot;
|
|
2
|
+
declare function LoginComponentSlot({ institutionLogin, handleInstitutionLogin, }: {
|
|
3
|
+
institutionLogin: any;
|
|
4
|
+
handleInstitutionLogin: any;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare namespace LoginComponentSlot {
|
|
7
|
+
namespace propTypes {
|
|
8
|
+
let institutionLogin: PropTypes.Requireable<boolean>;
|
|
9
|
+
let handleInstitutionLogin: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
import PropTypes from 'prop-types';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Slot } from '@openedx/frontend-base';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import LoginPage from '../../login/LoginPage';
|
|
5
|
+
const LoginComponentSlot = ({ institutionLogin, handleInstitutionLogin, }) => (_jsx(Slot, { id: "org.openedx.frontend.slot.authn.loginComponent.v1", institutionLogin: institutionLogin, handleInstitutionLogin: handleInstitutionLogin, children: _jsx(LoginPage, { institutionLogin: institutionLogin, handleInstitutionLogin: handleInstitutionLogin }) }));
|
|
6
|
+
LoginComponentSlot.propTypes = {
|
|
7
|
+
institutionLogin: PropTypes.bool,
|
|
8
|
+
handleInstitutionLogin: PropTypes.func,
|
|
9
|
+
};
|
|
10
|
+
export default LoginComponentSlot;
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/LoginComponentSlot/index.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAE9C,MAAM,kBAAkB,GAAG,CAAC,EAC1B,gBAAgB,EAChB,sBAAsB,GACvB,EAAE,EAAE,CAAC,CACJ,KAAC,IAAI,IACH,EAAE,EAAC,mDAAmD,EACtD,gBAAgB,EAAE,gBAAgB,EAClC,sBAAsB,EAAE,sBAAsB,YAE9C,KAAC,SAAS,IACR,gBAAgB,EAAE,gBAAgB,EAClC,sBAAsB,EAAE,sBAAsB,GAC9C,GACG,CACR,CAAC;AAEF,kBAAkB,CAAC,SAAS,GAAG;IAC7B,gBAAgB,EAAE,SAAS,CAAC,IAAI;IAChC,sBAAsB,EAAE,SAAS,CAAC,IAAI;CACvC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\nimport PropTypes from 'prop-types';\n\nimport LoginPage from '../../login/LoginPage';\n\nconst LoginComponentSlot = ({\n institutionLogin,\n handleInstitutionLogin,\n}) => (\n <Slot\n id=\"org.openedx.frontend.slot.authn.loginComponent.v1\"\n institutionLogin={institutionLogin}\n handleInstitutionLogin={handleInstitutionLogin}\n >\n <LoginPage\n institutionLogin={institutionLogin}\n handleInstitutionLogin={handleInstitutionLogin}\n />\n </Slot>\n);\n\nLoginComponentSlot.propTypes = {\n institutionLogin: PropTypes.bool,\n handleInstitutionLogin: PropTypes.func,\n};\n\nexport default LoginComponentSlot;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openedx/frontend-app-authn",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.8",
|
|
4
4
|
"description": "Frontend authentication",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "^24.12"
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"files": [
|
|
17
17
|
"/dist"
|
|
18
18
|
],
|
|
19
|
+
"workspaces": [
|
|
20
|
+
"packages/*"
|
|
21
|
+
],
|
|
19
22
|
"browserslist": [
|
|
20
23
|
"extends @edx/browserslist-config"
|
|
21
24
|
],
|
|
@@ -23,16 +26,28 @@
|
|
|
23
26
|
"*.css",
|
|
24
27
|
"*.scss"
|
|
25
28
|
],
|
|
29
|
+
"atlasTranslations": {
|
|
30
|
+
"path": "translations/frontend-app-authn/src/i18n/messages",
|
|
31
|
+
"dependencies": [
|
|
32
|
+
"@openedx/frontend-base"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
26
35
|
"scripts": {
|
|
27
36
|
"build": "make build",
|
|
37
|
+
"build:packages": "make build-packages",
|
|
28
38
|
"clean": "make clean",
|
|
39
|
+
"clean:packages": "make clean-packages",
|
|
29
40
|
"dev": "PORT=1999 PUBLIC_PATH=/authn openedx dev",
|
|
41
|
+
"dev:site": "make dev-site",
|
|
42
|
+
"dev:packages": "make dev-packages",
|
|
30
43
|
"i18n_extract": "openedx formatjs extract",
|
|
31
44
|
"lint": "openedx lint .",
|
|
32
45
|
"lint:fix": "openedx lint --fix .",
|
|
33
|
-
"prepack": "npm run build",
|
|
46
|
+
"prepack": "npm run clean && npm run build",
|
|
34
47
|
"snapshot": "openedx test --updateSnapshot",
|
|
35
|
-
"test": "openedx test --coverage --passWithNoTests"
|
|
48
|
+
"test": "openedx test --coverage --passWithNoTests",
|
|
49
|
+
"watch:build": "nodemon --exec 'npm run build'",
|
|
50
|
+
"translations:pull": "openedx translations:pull"
|
|
36
51
|
},
|
|
37
52
|
"author": "Open edX",
|
|
38
53
|
"license": "AGPL-3.0",
|
|
@@ -50,7 +65,6 @@
|
|
|
50
65
|
"@fortawesome/free-brands-svg-icons": "^6.7.2",
|
|
51
66
|
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
|
52
67
|
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
53
|
-
"@redux-devtools/extension": "^3.3.0",
|
|
54
68
|
"classnames": "^2.5.1",
|
|
55
69
|
"fastest-levenshtein": "^1.0.16",
|
|
56
70
|
"form-urlencoded": "^6.1.5",
|
|
@@ -60,31 +74,28 @@
|
|
|
60
74
|
"react-helmet": "^6.1.0",
|
|
61
75
|
"react-loading-skeleton": "^3.5.0",
|
|
62
76
|
"react-responsive": "^8.2.0",
|
|
63
|
-
"redux-logger": "^3.0.6",
|
|
64
|
-
"redux-mock-store": "^1.5.5",
|
|
65
|
-
"redux-saga": "^1.3.0",
|
|
66
|
-
"redux-thunk": "^2.4.2",
|
|
67
|
-
"reselect": "^5.1.1",
|
|
68
77
|
"universal-cookie": "^8.0.1"
|
|
69
78
|
},
|
|
70
79
|
"devDependencies": {
|
|
71
80
|
"@edx/browserslist-config": "^1.5.0",
|
|
72
81
|
"@testing-library/react": "^16.3.0",
|
|
82
|
+
"@types/jest": "^29.5.14",
|
|
73
83
|
"babel-plugin-formatjs": "10.5.38",
|
|
74
84
|
"eslint-plugin-import": "2.31.0",
|
|
75
85
|
"jest": "^29.7.0",
|
|
86
|
+
"nodemon": "^3.1.14",
|
|
76
87
|
"react-test-renderer": "^18.3.1",
|
|
77
88
|
"ts-jest": "^29.4.0",
|
|
78
|
-
"tsc-alias": "^1.8.16"
|
|
89
|
+
"tsc-alias": "^1.8.16",
|
|
90
|
+
"turbo": "^2.8.16"
|
|
79
91
|
},
|
|
80
92
|
"peerDependencies": {
|
|
81
|
-
"@openedx/frontend-base": "^1.0.0-alpha.
|
|
93
|
+
"@openedx/frontend-base": "^1.0.0-alpha || 0.0.0-dev",
|
|
82
94
|
"@openedx/paragon": "^23",
|
|
95
|
+
"@tanstack/react-query": "^5",
|
|
83
96
|
"react": "^18",
|
|
84
97
|
"react-dom": "^18",
|
|
85
|
-
"react-redux": "^8",
|
|
86
98
|
"react-router": "^6",
|
|
87
|
-
"react-router-dom": "^6"
|
|
88
|
-
"redux": "^4"
|
|
99
|
+
"react-router-dom": "^6"
|
|
89
100
|
}
|
|
90
101
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export const THIRD_PARTY_AUTH_CONTEXT: AsyncActionType;
|
|
2
|
-
export const THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG: "THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG";
|
|
3
|
-
export function getThirdPartyAuthContext(urlParams: any): {
|
|
4
|
-
type: string;
|
|
5
|
-
payload: {
|
|
6
|
-
urlParams: any;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export function getThirdPartyAuthContextBegin(): {
|
|
10
|
-
type: string;
|
|
11
|
-
};
|
|
12
|
-
export function getThirdPartyAuthContextSuccess(fieldDescriptions: any, optionalFields: any, thirdPartyAuthContext: any): {
|
|
13
|
-
type: string;
|
|
14
|
-
payload: {
|
|
15
|
-
fieldDescriptions: any;
|
|
16
|
-
optionalFields: any;
|
|
17
|
-
thirdPartyAuthContext: any;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export function getThirdPartyAuthContextFailure(): {
|
|
21
|
-
type: string;
|
|
22
|
-
};
|
|
23
|
-
export function clearThirdPartyAuthContextErrorMessage(): {
|
|
24
|
-
type: string;
|
|
25
|
-
};
|
|
26
|
-
import { AsyncActionType } from '../../data/utils';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { AsyncActionType } from '../../data/utils';
|
|
2
|
-
export const THIRD_PARTY_AUTH_CONTEXT = new AsyncActionType('THIRD_PARTY_AUTH', 'GET_THIRD_PARTY_AUTH_CONTEXT');
|
|
3
|
-
export const THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG = 'THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG';
|
|
4
|
-
// Third party auth context
|
|
5
|
-
export const getThirdPartyAuthContext = (urlParams) => ({
|
|
6
|
-
type: THIRD_PARTY_AUTH_CONTEXT.BASE,
|
|
7
|
-
payload: { urlParams },
|
|
8
|
-
});
|
|
9
|
-
export const getThirdPartyAuthContextBegin = () => ({
|
|
10
|
-
type: THIRD_PARTY_AUTH_CONTEXT.BEGIN,
|
|
11
|
-
});
|
|
12
|
-
export const getThirdPartyAuthContextSuccess = (fieldDescriptions, optionalFields, thirdPartyAuthContext) => ({
|
|
13
|
-
type: THIRD_PARTY_AUTH_CONTEXT.SUCCESS,
|
|
14
|
-
payload: { fieldDescriptions, optionalFields, thirdPartyAuthContext },
|
|
15
|
-
});
|
|
16
|
-
export const getThirdPartyAuthContextFailure = () => ({
|
|
17
|
-
type: THIRD_PARTY_AUTH_CONTEXT.FAILURE,
|
|
18
|
-
});
|
|
19
|
-
export const clearThirdPartyAuthContextErrorMessage = () => ({
|
|
20
|
-
type: THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG,
|
|
21
|
-
});
|
|
22
|
-
//# sourceMappingURL=actions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../src/common-components/data/actions.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,eAAe,CAAC,kBAAkB,EAAE,8BAA8B,CAAC,CAAC;AAChH,MAAM,CAAC,MAAM,wCAAwC,GAAG,0CAA0C,CAAC;AAEnG,2BAA2B;AAC3B,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IACtD,IAAI,EAAE,wBAAwB,CAAC,IAAI;IACnC,OAAO,EAAE,EAAE,SAAS,EAAE;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,EAAE,CAAC,CAAC;IAClD,IAAI,EAAE,wBAAwB,CAAC,KAAK;CACrC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE,EAAE,CAAC,CAAC;IAC5G,IAAI,EAAE,wBAAwB,CAAC,OAAO;IACtC,OAAO,EAAE,EAAE,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE;CACtE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,EAAE,CAAC,CAAC;IACpD,IAAI,EAAE,wBAAwB,CAAC,OAAO;CACvC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sCAAsC,GAAG,GAAG,EAAE,CAAC,CAAC;IAC3D,IAAI,EAAE,wCAAwC;CAC/C,CAAC,CAAC","sourcesContent":["import { AsyncActionType } from '../../data/utils';\n\nexport const THIRD_PARTY_AUTH_CONTEXT = new AsyncActionType('THIRD_PARTY_AUTH', 'GET_THIRD_PARTY_AUTH_CONTEXT');\nexport const THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG = 'THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG';\n\n// Third party auth context\nexport const getThirdPartyAuthContext = (urlParams) => ({\n type: THIRD_PARTY_AUTH_CONTEXT.BASE,\n payload: { urlParams },\n});\n\nexport const getThirdPartyAuthContextBegin = () => ({\n type: THIRD_PARTY_AUTH_CONTEXT.BEGIN,\n});\n\nexport const getThirdPartyAuthContextSuccess = (fieldDescriptions, optionalFields, thirdPartyAuthContext) => ({\n type: THIRD_PARTY_AUTH_CONTEXT.SUCCESS,\n payload: { fieldDescriptions, optionalFields, thirdPartyAuthContext },\n});\n\nexport const getThirdPartyAuthContextFailure = () => ({\n type: THIRD_PARTY_AUTH_CONTEXT.FAILURE,\n});\n\nexport const clearThirdPartyAuthContextErrorMessage = () => ({\n type: THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG,\n});\n"]}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
export namespace defaultState {
|
|
2
|
-
let fieldDescriptions: {};
|
|
3
|
-
namespace optionalFields {
|
|
4
|
-
let fields: {};
|
|
5
|
-
let extended_profile: never[];
|
|
6
|
-
}
|
|
7
|
-
let thirdPartyAuthApiStatus: null;
|
|
8
|
-
namespace thirdPartyAuthContext {
|
|
9
|
-
let autoSubmitRegForm: boolean;
|
|
10
|
-
let currentProvider: null;
|
|
11
|
-
let finishAuthUrl: null;
|
|
12
|
-
let countryCode: null;
|
|
13
|
-
let providers: never[];
|
|
14
|
-
let secondaryProviders: never[];
|
|
15
|
-
let pipelineUserDetails: null;
|
|
16
|
-
let errorMessage: null;
|
|
17
|
-
let welcomePageRedirectUrl: null;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export default reducer;
|
|
21
|
-
declare function reducer(state?: {
|
|
22
|
-
fieldDescriptions: {};
|
|
23
|
-
optionalFields: {
|
|
24
|
-
fields: {};
|
|
25
|
-
extended_profile: never[];
|
|
26
|
-
};
|
|
27
|
-
thirdPartyAuthApiStatus: null;
|
|
28
|
-
thirdPartyAuthContext: {
|
|
29
|
-
autoSubmitRegForm: boolean;
|
|
30
|
-
currentProvider: null;
|
|
31
|
-
finishAuthUrl: null;
|
|
32
|
-
countryCode: null;
|
|
33
|
-
providers: never[];
|
|
34
|
-
secondaryProviders: never[];
|
|
35
|
-
pipelineUserDetails: null;
|
|
36
|
-
errorMessage: null;
|
|
37
|
-
welcomePageRedirectUrl: null;
|
|
38
|
-
};
|
|
39
|
-
}, action?: {}): {
|
|
40
|
-
fieldDescriptions: {};
|
|
41
|
-
optionalFields: {
|
|
42
|
-
fields: {};
|
|
43
|
-
extended_profile: never[];
|
|
44
|
-
};
|
|
45
|
-
thirdPartyAuthApiStatus: null;
|
|
46
|
-
thirdPartyAuthContext: {
|
|
47
|
-
autoSubmitRegForm: boolean;
|
|
48
|
-
currentProvider: null;
|
|
49
|
-
finishAuthUrl: null;
|
|
50
|
-
countryCode: null;
|
|
51
|
-
providers: never[];
|
|
52
|
-
secondaryProviders: never[];
|
|
53
|
-
pipelineUserDetails: null;
|
|
54
|
-
errorMessage: null;
|
|
55
|
-
welcomePageRedirectUrl: null;
|
|
56
|
-
};
|
|
57
|
-
} | {
|
|
58
|
-
fieldDescriptions: any;
|
|
59
|
-
optionalFields: any;
|
|
60
|
-
thirdPartyAuthContext: any;
|
|
61
|
-
thirdPartyAuthApiStatus: string;
|
|
62
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { THIRD_PARTY_AUTH_CONTEXT, THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG } from './actions';
|
|
2
|
-
import { COMPLETE_STATE, FAILURE_STATE, PENDING_STATE } from '../../data/constants';
|
|
3
|
-
export const defaultState = {
|
|
4
|
-
fieldDescriptions: {},
|
|
5
|
-
optionalFields: {
|
|
6
|
-
fields: {},
|
|
7
|
-
extended_profile: [],
|
|
8
|
-
},
|
|
9
|
-
thirdPartyAuthApiStatus: null,
|
|
10
|
-
thirdPartyAuthContext: {
|
|
11
|
-
autoSubmitRegForm: false,
|
|
12
|
-
currentProvider: null,
|
|
13
|
-
finishAuthUrl: null,
|
|
14
|
-
countryCode: null,
|
|
15
|
-
providers: [],
|
|
16
|
-
secondaryProviders: [],
|
|
17
|
-
pipelineUserDetails: null,
|
|
18
|
-
errorMessage: null,
|
|
19
|
-
welcomePageRedirectUrl: null,
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
const reducer = (state = defaultState, action = {}) => {
|
|
23
|
-
var _a;
|
|
24
|
-
switch (action.type) {
|
|
25
|
-
case THIRD_PARTY_AUTH_CONTEXT.BEGIN:
|
|
26
|
-
return Object.assign(Object.assign({}, state), { thirdPartyAuthApiStatus: PENDING_STATE });
|
|
27
|
-
case THIRD_PARTY_AUTH_CONTEXT.SUCCESS: {
|
|
28
|
-
return Object.assign(Object.assign({}, state), { fieldDescriptions: (_a = action.payload.fieldDescriptions) === null || _a === void 0 ? void 0 : _a.fields, optionalFields: action.payload.optionalFields, thirdPartyAuthContext: action.payload.thirdPartyAuthContext, thirdPartyAuthApiStatus: COMPLETE_STATE });
|
|
29
|
-
}
|
|
30
|
-
case THIRD_PARTY_AUTH_CONTEXT.FAILURE:
|
|
31
|
-
return Object.assign(Object.assign({}, state), { thirdPartyAuthApiStatus: FAILURE_STATE, thirdPartyAuthContext: Object.assign(Object.assign({}, state.thirdPartyAuthContext), { errorMessage: null }) });
|
|
32
|
-
case THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG:
|
|
33
|
-
return Object.assign(Object.assign({}, state), { thirdPartyAuthApiStatus: PENDING_STATE, thirdPartyAuthContext: Object.assign(Object.assign({}, state.thirdPartyAuthContext), { errorMessage: null }) });
|
|
34
|
-
default:
|
|
35
|
-
return state;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
export default reducer;
|
|
39
|
-
//# sourceMappingURL=reducers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reducers.js","sourceRoot":"","sources":["../../../src/common-components/data/reducers.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,wCAAwC,EAAE,MAAM,WAAW,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEpF,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,iBAAiB,EAAE,EAAE;IACrB,cAAc,EAAE;QACd,MAAM,EAAE,EAAE;QACV,gBAAgB,EAAE,EAAE;KACrB;IACD,uBAAuB,EAAE,IAAI;IAC7B,qBAAqB,EAAE;QACrB,iBAAiB,EAAE,KAAK;QACxB,eAAe,EAAE,IAAI;QACrB,aAAa,EAAE,IAAI;QACnB,WAAW,EAAE,IAAI;QACjB,SAAS,EAAE,EAAE;QACb,kBAAkB,EAAE,EAAE;QACtB,mBAAmB,EAAE,IAAI;QACzB,YAAY,EAAE,IAAI;QAClB,sBAAsB,EAAE,IAAI;KAC7B;CACF,CAAC;AAEF,MAAM,OAAO,GAAG,CAAC,KAAK,GAAG,YAAY,EAAE,MAAM,GAAG,EAAE,EAAE,EAAE;;IACpD,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,wBAAwB,CAAC,KAAK;YACjC,uCACK,KAAK,KACR,uBAAuB,EAAE,aAAa,IACtC;QACJ,KAAK,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAAC;YACtC,uCACK,KAAK,KACR,iBAAiB,EAAE,MAAA,MAAM,CAAC,OAAO,CAAC,iBAAiB,0CAAE,MAAM,EAC3D,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,cAAc,EAC7C,qBAAqB,EAAE,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAC3D,uBAAuB,EAAE,cAAc,IACvC;QACJ,CAAC;QACD,KAAK,wBAAwB,CAAC,OAAO;YACnC,uCACK,KAAK,KACR,uBAAuB,EAAE,aAAa,EACtC,qBAAqB,kCAChB,KAAK,CAAC,qBAAqB,KAC9B,YAAY,EAAE,IAAI,OAEpB;QACJ,KAAK,wCAAwC;YAC3C,uCACK,KAAK,KACR,uBAAuB,EAAE,aAAa,EACtC,qBAAqB,kCAChB,KAAK,CAAC,qBAAqB,KAC9B,YAAY,EAAE,IAAI,OAEpB;QACJ;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import { THIRD_PARTY_AUTH_CONTEXT, THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG } from './actions';\nimport { COMPLETE_STATE, FAILURE_STATE, PENDING_STATE } from '../../data/constants';\n\nexport const defaultState = {\n fieldDescriptions: {},\n optionalFields: {\n fields: {},\n extended_profile: [],\n },\n thirdPartyAuthApiStatus: null,\n thirdPartyAuthContext: {\n autoSubmitRegForm: false,\n currentProvider: null,\n finishAuthUrl: null,\n countryCode: null,\n providers: [],\n secondaryProviders: [],\n pipelineUserDetails: null,\n errorMessage: null,\n welcomePageRedirectUrl: null,\n },\n};\n\nconst reducer = (state = defaultState, action = {}) => {\n switch (action.type) {\n case THIRD_PARTY_AUTH_CONTEXT.BEGIN:\n return {\n ...state,\n thirdPartyAuthApiStatus: PENDING_STATE,\n };\n case THIRD_PARTY_AUTH_CONTEXT.SUCCESS: {\n return {\n ...state,\n fieldDescriptions: action.payload.fieldDescriptions?.fields,\n optionalFields: action.payload.optionalFields,\n thirdPartyAuthContext: action.payload.thirdPartyAuthContext,\n thirdPartyAuthApiStatus: COMPLETE_STATE,\n };\n }\n case THIRD_PARTY_AUTH_CONTEXT.FAILURE:\n return {\n ...state,\n thirdPartyAuthApiStatus: FAILURE_STATE,\n thirdPartyAuthContext: {\n ...state.thirdPartyAuthContext,\n errorMessage: null,\n },\n };\n case THIRD_PARTY_AUTH_CONTEXT_CLEAR_ERROR_MSG:\n return {\n ...state,\n thirdPartyAuthApiStatus: PENDING_STATE,\n thirdPartyAuthContext: {\n ...state.thirdPartyAuthContext,\n errorMessage: null,\n },\n };\n default:\n return state;\n }\n};\n\nexport default reducer;\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export function fetchThirdPartyAuthContext(action: any): Generator<import("redux-saga/effects").PutEffect<{
|
|
2
|
-
type: string;
|
|
3
|
-
}> | import("redux-saga/effects").CallEffect<{
|
|
4
|
-
fieldDescriptions: any;
|
|
5
|
-
optionalFields: any;
|
|
6
|
-
thirdPartyAuthContext: any;
|
|
7
|
-
}>, void, {
|
|
8
|
-
fieldDescriptions: any;
|
|
9
|
-
optionalFields: any;
|
|
10
|
-
thirdPartyAuthContext: any;
|
|
11
|
-
}>;
|
|
12
|
-
export default function saga(): Generator<import("redux-saga/effects").ForkEffect<never>, void, unknown>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { logError } from '@openedx/frontend-base';
|
|
2
|
-
import { call, put, takeEvery } from 'redux-saga/effects';
|
|
3
|
-
import { setCountryFromThirdPartyAuthContext } from '../../register/data/actions';
|
|
4
|
-
import { getThirdPartyAuthContextBegin, getThirdPartyAuthContextFailure, getThirdPartyAuthContextSuccess, THIRD_PARTY_AUTH_CONTEXT, } from './actions';
|
|
5
|
-
import { getThirdPartyAuthContext, } from './service';
|
|
6
|
-
export function* fetchThirdPartyAuthContext(action) {
|
|
7
|
-
try {
|
|
8
|
-
yield put(getThirdPartyAuthContextBegin());
|
|
9
|
-
const { fieldDescriptions, optionalFields, thirdPartyAuthContext, } = yield call(getThirdPartyAuthContext, action.payload.urlParams);
|
|
10
|
-
yield put(setCountryFromThirdPartyAuthContext(thirdPartyAuthContext.countryCode));
|
|
11
|
-
yield put(getThirdPartyAuthContextSuccess(fieldDescriptions, optionalFields, thirdPartyAuthContext));
|
|
12
|
-
}
|
|
13
|
-
catch (e) {
|
|
14
|
-
yield put(getThirdPartyAuthContextFailure());
|
|
15
|
-
logError(e);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export default function* saga() {
|
|
19
|
-
yield takeEvery(THIRD_PARTY_AUTH_CONTEXT.BASE, fetchThirdPartyAuthContext);
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=sagas.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sagas.js","sourceRoot":"","sources":["../../../src/common-components/data/sagas.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,mCAAmC,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAC/B,+BAA+B,EAC/B,wBAAwB,GACzB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,wBAAwB,GACzB,MAAM,WAAW,CAAC;AAEnB,MAAM,SAAS,CAAC,CAAC,0BAA0B,CAAC,MAAM;IAChD,IAAI,CAAC;QACH,MAAM,GAAG,CAAC,6BAA6B,EAAE,CAAC,CAAC;QAC3C,MAAM,EACJ,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,GACzD,GAAG,MAAM,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAEnE,MAAM,GAAG,CAAC,mCAAmC,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC;QAClF,MAAM,GAAG,CAAC,+BAA+B,CAAC,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACvG,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,GAAG,CAAC,+BAA+B,EAAE,CAAC,CAAC;QAC7C,QAAQ,CAAC,CAAC,CAAC,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,CAAC,OAAO,SAAS,CAAC,CAAC,IAAI;IAC3B,MAAM,SAAS,CAAC,wBAAwB,CAAC,IAAI,EAAE,0BAA0B,CAAC,CAAC;AAC7E,CAAC","sourcesContent":["import { logError } from '@openedx/frontend-base';\nimport { call, put, takeEvery } from 'redux-saga/effects';\n\nimport { setCountryFromThirdPartyAuthContext } from '../../register/data/actions';\nimport {\n getThirdPartyAuthContextBegin,\n getThirdPartyAuthContextFailure,\n getThirdPartyAuthContextSuccess,\n THIRD_PARTY_AUTH_CONTEXT,\n} from './actions';\nimport {\n getThirdPartyAuthContext,\n} from './service';\n\nexport function* fetchThirdPartyAuthContext(action) {\n try {\n yield put(getThirdPartyAuthContextBegin());\n const {\n fieldDescriptions, optionalFields, thirdPartyAuthContext,\n } = yield call(getThirdPartyAuthContext, action.payload.urlParams);\n\n yield put(setCountryFromThirdPartyAuthContext(thirdPartyAuthContext.countryCode));\n yield put(getThirdPartyAuthContextSuccess(fieldDescriptions, optionalFields, thirdPartyAuthContext));\n } catch (e) {\n yield put(getThirdPartyAuthContextFailure());\n logError(e);\n }\n}\n\nexport default function* saga() {\n yield takeEvery(THIRD_PARTY_AUTH_CONTEXT.BASE, fetchThirdPartyAuthContext);\n}\n"]}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
export const storeName: "commonComponents";
|
|
2
|
-
export function commonComponentsSelector(state: any): any;
|
|
3
|
-
export const thirdPartyAuthContextSelector: ((state: any) => any) & {
|
|
4
|
-
clearCache: () => void;
|
|
5
|
-
resultsCount: () => number;
|
|
6
|
-
resetResultsCount: () => void;
|
|
7
|
-
} & {
|
|
8
|
-
resultFunc: (resultFuncArgs_0: any) => any;
|
|
9
|
-
memoizedResultFunc: ((resultFuncArgs_0: any) => any) & {
|
|
10
|
-
clearCache: () => void;
|
|
11
|
-
resultsCount: () => number;
|
|
12
|
-
resetResultsCount: () => void;
|
|
13
|
-
};
|
|
14
|
-
lastResult: () => any;
|
|
15
|
-
dependencies: [(state: any) => any];
|
|
16
|
-
recomputations: () => number;
|
|
17
|
-
resetRecomputations: () => void;
|
|
18
|
-
dependencyRecomputations: () => number;
|
|
19
|
-
resetDependencyRecomputations: () => void;
|
|
20
|
-
} & {
|
|
21
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
22
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
23
|
-
};
|
|
24
|
-
export const fieldDescriptionSelector: ((state: any) => any) & {
|
|
25
|
-
clearCache: () => void;
|
|
26
|
-
resultsCount: () => number;
|
|
27
|
-
resetResultsCount: () => void;
|
|
28
|
-
} & {
|
|
29
|
-
resultFunc: (resultFuncArgs_0: any) => any;
|
|
30
|
-
memoizedResultFunc: ((resultFuncArgs_0: any) => any) & {
|
|
31
|
-
clearCache: () => void;
|
|
32
|
-
resultsCount: () => number;
|
|
33
|
-
resetResultsCount: () => void;
|
|
34
|
-
};
|
|
35
|
-
lastResult: () => any;
|
|
36
|
-
dependencies: [(state: any) => any];
|
|
37
|
-
recomputations: () => number;
|
|
38
|
-
resetRecomputations: () => void;
|
|
39
|
-
dependencyRecomputations: () => number;
|
|
40
|
-
resetDependencyRecomputations: () => void;
|
|
41
|
-
} & {
|
|
42
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
43
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
44
|
-
};
|
|
45
|
-
export const optionalFieldsSelector: ((state: any) => any) & {
|
|
46
|
-
clearCache: () => void;
|
|
47
|
-
resultsCount: () => number;
|
|
48
|
-
resetResultsCount: () => void;
|
|
49
|
-
} & {
|
|
50
|
-
resultFunc: (resultFuncArgs_0: any) => any;
|
|
51
|
-
memoizedResultFunc: ((resultFuncArgs_0: any) => any) & {
|
|
52
|
-
clearCache: () => void;
|
|
53
|
-
resultsCount: () => number;
|
|
54
|
-
resetResultsCount: () => void;
|
|
55
|
-
};
|
|
56
|
-
lastResult: () => any;
|
|
57
|
-
dependencies: [(state: any) => any];
|
|
58
|
-
recomputations: () => number;
|
|
59
|
-
resetRecomputations: () => void;
|
|
60
|
-
dependencyRecomputations: () => number;
|
|
61
|
-
resetDependencyRecomputations: () => void;
|
|
62
|
-
} & {
|
|
63
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
64
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
65
|
-
};
|
|
66
|
-
export const tpaProvidersSelector: ((state: any) => {
|
|
67
|
-
providers: any;
|
|
68
|
-
secondaryProviders: any;
|
|
69
|
-
}) & {
|
|
70
|
-
clearCache: () => void;
|
|
71
|
-
resultsCount: () => number;
|
|
72
|
-
resetResultsCount: () => void;
|
|
73
|
-
} & {
|
|
74
|
-
resultFunc: (resultFuncArgs_0: any) => {
|
|
75
|
-
providers: any;
|
|
76
|
-
secondaryProviders: any;
|
|
77
|
-
};
|
|
78
|
-
memoizedResultFunc: ((resultFuncArgs_0: any) => {
|
|
79
|
-
providers: any;
|
|
80
|
-
secondaryProviders: any;
|
|
81
|
-
}) & {
|
|
82
|
-
clearCache: () => void;
|
|
83
|
-
resultsCount: () => number;
|
|
84
|
-
resetResultsCount: () => void;
|
|
85
|
-
};
|
|
86
|
-
lastResult: () => {
|
|
87
|
-
providers: any;
|
|
88
|
-
secondaryProviders: any;
|
|
89
|
-
};
|
|
90
|
-
dependencies: [(state: any) => any];
|
|
91
|
-
recomputations: () => number;
|
|
92
|
-
resetRecomputations: () => void;
|
|
93
|
-
dependencyRecomputations: () => number;
|
|
94
|
-
resetDependencyRecomputations: () => void;
|
|
95
|
-
} & {
|
|
96
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
97
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
98
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createSelector } from 'reselect';
|
|
2
|
-
export const storeName = 'commonComponents';
|
|
3
|
-
export const commonComponentsSelector = state => (Object.assign({}, state[storeName]));
|
|
4
|
-
export const thirdPartyAuthContextSelector = createSelector(commonComponentsSelector, commonComponents => commonComponents.thirdPartyAuthContext);
|
|
5
|
-
export const fieldDescriptionSelector = createSelector(commonComponentsSelector, commonComponents => commonComponents.fieldDescriptions);
|
|
6
|
-
export const optionalFieldsSelector = createSelector(commonComponentsSelector, commonComponents => commonComponents.optionalFields);
|
|
7
|
-
export const tpaProvidersSelector = createSelector(commonComponentsSelector, commonComponents => ({
|
|
8
|
-
providers: commonComponents.thirdPartyAuthContext.providers,
|
|
9
|
-
secondaryProviders: commonComponents.thirdPartyAuthContext.secondaryProviders,
|
|
10
|
-
}));
|
|
11
|
-
//# sourceMappingURL=selectors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.js","sourceRoot":"","sources":["../../../src/common-components/data/selectors.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC;AAE5C,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC,EAAE,CAAC,mBAAM,KAAK,CAAC,SAAS,CAAC,EAAG,CAAC;AAE3E,MAAM,CAAC,MAAM,6BAA6B,GAAG,cAAc,CACzD,wBAAwB,EACxB,gBAAgB,CAAC,EAAE,CAAC,gBAAgB,CAAC,qBAAqB,CAC3D,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,cAAc,CACpD,wBAAwB,EACxB,gBAAgB,CAAC,EAAE,CAAC,gBAAgB,CAAC,iBAAiB,CACvD,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,cAAc,CAClD,wBAAwB,EACxB,gBAAgB,CAAC,EAAE,CAAC,gBAAgB,CAAC,cAAc,CACpD,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,cAAc,CAChD,wBAAwB,EACxB,gBAAgB,CAAC,EAAE,CAAC,CAAC;IACnB,SAAS,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,SAAS;IAC3D,kBAAkB,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,kBAAkB;CAC9E,CAAC,CACH,CAAC","sourcesContent":["import { createSelector } from 'reselect';\n\nexport const storeName = 'commonComponents';\n\nexport const commonComponentsSelector = state => ({ ...state[storeName] });\n\nexport const thirdPartyAuthContextSelector = createSelector(\n commonComponentsSelector,\n commonComponents => commonComponents.thirdPartyAuthContext,\n);\n\nexport const fieldDescriptionSelector = createSelector(\n commonComponentsSelector,\n commonComponents => commonComponents.fieldDescriptions,\n);\n\nexport const optionalFieldsSelector = createSelector(\n commonComponentsSelector,\n commonComponents => commonComponents.optionalFields,\n);\n\nexport const tpaProvidersSelector = createSelector(\n commonComponentsSelector,\n commonComponents => ({\n providers: commonComponents.thirdPartyAuthContext.providers,\n secondaryProviders: commonComponents.thirdPartyAuthContext.secondaryProviders,\n }),\n);\n"]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { getAuthenticatedHttpClient, getSiteConfig } from '@openedx/frontend-base';
|
|
11
|
-
export function getThirdPartyAuthContext(urlParams) {
|
|
12
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
13
|
-
var _a, _b, _c;
|
|
14
|
-
const requestConfig = {
|
|
15
|
-
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
16
|
-
params: urlParams,
|
|
17
|
-
isPublic: true,
|
|
18
|
-
};
|
|
19
|
-
const { data } = yield getAuthenticatedHttpClient()
|
|
20
|
-
.get(`${getSiteConfig().lmsBaseUrl}/api/mfe_context`, requestConfig)
|
|
21
|
-
.catch((e) => {
|
|
22
|
-
throw (e);
|
|
23
|
-
});
|
|
24
|
-
return {
|
|
25
|
-
fieldDescriptions: (_a = data.registrationFields) !== null && _a !== void 0 ? _a : {},
|
|
26
|
-
optionalFields: (_b = data.optionalFields) !== null && _b !== void 0 ? _b : {},
|
|
27
|
-
thirdPartyAuthContext: (_c = data.contextData) !== null && _c !== void 0 ? _c : {},
|
|
28
|
-
};
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/common-components/data/service.js"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,0BAA0B,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEnF,MAAM,UAAgB,wBAAwB,CAAC,SAAS;;;QACtD,MAAM,aAAa,GAAG;YACpB,OAAO,EAAE,EAAE,cAAc,EAAE,mCAAmC,EAAE;YAChE,MAAM,EAAE,SAAS;YACjB,QAAQ,EAAE,IAAI;SACf,CAAC;QAEF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,0BAA0B,EAAE;aAChD,GAAG,CACF,GAAG,aAAa,EAAE,CAAC,UAAU,kBAAkB,EAC/C,aAAa,CACd;aACA,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;YACX,MAAM,CAAC,CAAC,CAAC,CAAC;QACZ,CAAC,CAAC,CAAC;QACL,OAAO;YACL,iBAAiB,EAAE,MAAA,IAAI,CAAC,kBAAkB,mCAAI,EAAE;YAChD,cAAc,EAAE,MAAA,IAAI,CAAC,cAAc,mCAAI,EAAE;YACzC,qBAAqB,EAAE,MAAA,IAAI,CAAC,WAAW,mCAAI,EAAE;SAC9C,CAAC;IACJ,CAAC;CAAA","sourcesContent":["import { getAuthenticatedHttpClient, getSiteConfig } from '@openedx/frontend-base';\n\nexport async function getThirdPartyAuthContext(urlParams) {\n const requestConfig = {\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n params: urlParams,\n isPublic: true,\n };\n\n const { data } = await getAuthenticatedHttpClient()\n .get(\n `${getSiteConfig().lmsBaseUrl}/api/mfe_context`,\n requestConfig,\n )\n .catch((e) => {\n throw (e);\n });\n return {\n fieldDescriptions: data.registrationFields ?? {},\n optionalFields: data.optionalFields ?? {},\n thirdPartyAuthContext: data.contextData ?? {},\n };\n}\n"]}
|