@asgardeo/react 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +210 -50
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/SignIn/fragments/BasicAuth.d.ts +2 -2
- package/dist/cjs/types/components/SignIn/fragments/EmailOtp.d.ts +2 -2
- package/dist/cjs/types/components/SignIn/fragments/IdentifierFirst.d.ts +35 -0
- package/dist/cjs/types/components/SignIn/fragments/SmsOtp.d.ts +2 -2
- package/dist/cjs/types/components/SignIn/fragments/Totp.d.ts +2 -2
- package/dist/cjs/types/models/auth-context.d.ts +5 -1
- package/dist/cjs/types/models/sign-in.d.ts +5 -0
- package/dist/cjs/types/models/use-authentication.d.ts +4 -1
- package/dist/esm/index.js +210 -50
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/SignIn/fragments/BasicAuth.d.ts +2 -2
- package/dist/esm/types/components/SignIn/fragments/EmailOtp.d.ts +2 -2
- package/dist/esm/types/components/SignIn/fragments/IdentifierFirst.d.ts +35 -0
- package/dist/esm/types/components/SignIn/fragments/SmsOtp.d.ts +2 -2
- package/dist/esm/types/components/SignIn/fragments/Totp.d.ts +2 -2
- package/dist/esm/types/models/auth-context.d.ts +5 -1
- package/dist/esm/types/models/sign-in.d.ts +5 -0
- package/dist/esm/types/models/use-authentication.d.ts +4 -1
- package/dist/index.d.ts +9 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -5622,6 +5622,23 @@ const keys = {
|
|
|
5622
5622
|
placeholder: 'emailOtp.username.placeholder',
|
|
5623
5623
|
},
|
|
5624
5624
|
},
|
|
5625
|
+
identifierFirst: {
|
|
5626
|
+
button: 'identifierFirst.button',
|
|
5627
|
+
continue: 'identifierFirst.continue',
|
|
5628
|
+
enter: {
|
|
5629
|
+
your: {
|
|
5630
|
+
username: 'identifierFirst.enter.your.username',
|
|
5631
|
+
},
|
|
5632
|
+
},
|
|
5633
|
+
login: {
|
|
5634
|
+
heading: 'identifierFirst.login.heading',
|
|
5635
|
+
},
|
|
5636
|
+
remember: {
|
|
5637
|
+
me: 'identifierFirst.remember.me',
|
|
5638
|
+
},
|
|
5639
|
+
retry: 'identifierFirst.retry',
|
|
5640
|
+
username: 'identifierFirst.username',
|
|
5641
|
+
},
|
|
5625
5642
|
login: {
|
|
5626
5643
|
button: 'login.login.button',
|
|
5627
5644
|
enter: {
|
|
@@ -5675,11 +5692,14 @@ const keys = {
|
|
|
5675
5692
|
|
|
5676
5693
|
function __variableDynamicImportRuntime0__(path) {
|
|
5677
5694
|
switch (path) {
|
|
5678
|
-
case './screens/common/en-US.ts': return Promise.resolve().then(function () { return enUS$
|
|
5679
|
-
case './screens/common/fr-FR.ts': return Promise.resolve().then(function () { return frFR$
|
|
5680
|
-
case './screens/common/model.ts': return Promise.resolve().then(function () { return model$
|
|
5681
|
-
case './screens/emailOtp/en-US.ts': return Promise.resolve().then(function () { return enUS$
|
|
5682
|
-
case './screens/emailOtp/model.ts': return Promise.resolve().then(function () { return model$
|
|
5695
|
+
case './screens/common/en-US.ts': return Promise.resolve().then(function () { return enUS$5; });
|
|
5696
|
+
case './screens/common/fr-FR.ts': return Promise.resolve().then(function () { return frFR$3; });
|
|
5697
|
+
case './screens/common/model.ts': return Promise.resolve().then(function () { return model$5; });
|
|
5698
|
+
case './screens/emailOtp/en-US.ts': return Promise.resolve().then(function () { return enUS$4; });
|
|
5699
|
+
case './screens/emailOtp/model.ts': return Promise.resolve().then(function () { return model$4; });
|
|
5700
|
+
case './screens/identifierFirst/en-US.ts': return Promise.resolve().then(function () { return enUS$3; });
|
|
5701
|
+
case './screens/identifierFirst/fr-FR.ts': return Promise.resolve().then(function () { return frFR$2; });
|
|
5702
|
+
case './screens/identifierFirst/model.ts': return Promise.resolve().then(function () { return model$3; });
|
|
5683
5703
|
case './screens/login/en-US.ts': return Promise.resolve().then(function () { return enUS$2; });
|
|
5684
5704
|
case './screens/login/fr-FR.ts': return Promise.resolve().then(function () { return frFR$1; });
|
|
5685
5705
|
case './screens/login/model.ts': return Promise.resolve().then(function () { return model$2; });
|
|
@@ -5888,10 +5908,10 @@ const common$1 = {
|
|
|
5888
5908
|
'privacy.policy': 'Privacy Policy',
|
|
5889
5909
|
register: 'Register',
|
|
5890
5910
|
'site.title': 'WSO2 Identity Server',
|
|
5891
|
-
'terms.of.service': 'Terms of
|
|
5911
|
+
'terms.of.service': 'Terms of Service',
|
|
5892
5912
|
};
|
|
5893
5913
|
|
|
5894
|
-
var enUS$
|
|
5914
|
+
var enUS$5 = /*#__PURE__*/Object.freeze({
|
|
5895
5915
|
__proto__: null,
|
|
5896
5916
|
common: common$1
|
|
5897
5917
|
});
|
|
@@ -5926,7 +5946,7 @@ const common$2 = {
|
|
|
5926
5946
|
'terms.of.service': 'Conditions de service',
|
|
5927
5947
|
};
|
|
5928
5948
|
|
|
5929
|
-
var frFR$
|
|
5949
|
+
var frFR$3 = /*#__PURE__*/Object.freeze({
|
|
5930
5950
|
__proto__: null,
|
|
5931
5951
|
common: common$2
|
|
5932
5952
|
});
|
|
@@ -5949,7 +5969,7 @@ var frFR$2 = /*#__PURE__*/Object.freeze({
|
|
|
5949
5969
|
* under the License.
|
|
5950
5970
|
*/
|
|
5951
5971
|
|
|
5952
|
-
var model$
|
|
5972
|
+
var model$5 = /*#__PURE__*/Object.freeze({
|
|
5953
5973
|
__proto__: null
|
|
5954
5974
|
});
|
|
5955
5975
|
|
|
@@ -5980,11 +6000,97 @@ const emailOtp = {
|
|
|
5980
6000
|
'username.placeholder': 'Enter your username',
|
|
5981
6001
|
};
|
|
5982
6002
|
|
|
5983
|
-
var enUS$
|
|
6003
|
+
var enUS$4 = /*#__PURE__*/Object.freeze({
|
|
5984
6004
|
__proto__: null,
|
|
5985
6005
|
emailOtp: emailOtp
|
|
5986
6006
|
});
|
|
5987
6007
|
|
|
6008
|
+
/**
|
|
6009
|
+
* Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
|
|
6010
|
+
*
|
|
6011
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
6012
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6013
|
+
* in compliance with the License.
|
|
6014
|
+
* You may obtain a copy of the License at
|
|
6015
|
+
*
|
|
6016
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6017
|
+
*
|
|
6018
|
+
* Unless required by applicable law or agreed to in writing,
|
|
6019
|
+
* software distributed under the License is distributed on an
|
|
6020
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
6021
|
+
* KIND, either express or implied. See the License for the
|
|
6022
|
+
* specific language governing permissions and limitations
|
|
6023
|
+
* under the License.
|
|
6024
|
+
*/
|
|
6025
|
+
|
|
6026
|
+
var model$4 = /*#__PURE__*/Object.freeze({
|
|
6027
|
+
__proto__: null
|
|
6028
|
+
});
|
|
6029
|
+
|
|
6030
|
+
/**
|
|
6031
|
+
* Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
|
|
6032
|
+
*
|
|
6033
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
6034
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6035
|
+
* in compliance with the License.
|
|
6036
|
+
* You may obtain a copy of the License at
|
|
6037
|
+
*
|
|
6038
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6039
|
+
*
|
|
6040
|
+
* Unless required by applicable law or agreed to in writing,
|
|
6041
|
+
* software distributed under the License is distributed on an
|
|
6042
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
6043
|
+
* KIND, either express or implied. See the License for the
|
|
6044
|
+
* specific language governing permissions and limitations
|
|
6045
|
+
* under the License.
|
|
6046
|
+
*/
|
|
6047
|
+
const identifierFirst$1 = {
|
|
6048
|
+
continue: 'Continue',
|
|
6049
|
+
'enter.your.username': 'Enter your username',
|
|
6050
|
+
'login.button': 'Sign In',
|
|
6051
|
+
'login.heading': 'Sign In',
|
|
6052
|
+
'remember.me': 'Remember me on this computer',
|
|
6053
|
+
retry: 'Login failed! Please check your username and password and try again.',
|
|
6054
|
+
username: 'Username',
|
|
6055
|
+
};
|
|
6056
|
+
|
|
6057
|
+
var enUS$3 = /*#__PURE__*/Object.freeze({
|
|
6058
|
+
__proto__: null,
|
|
6059
|
+
identifierFirst: identifierFirst$1
|
|
6060
|
+
});
|
|
6061
|
+
|
|
6062
|
+
/**
|
|
6063
|
+
* Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
|
|
6064
|
+
*
|
|
6065
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
6066
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6067
|
+
* in compliance with the License.
|
|
6068
|
+
* You may obtain a copy of the License at
|
|
6069
|
+
*
|
|
6070
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6071
|
+
*
|
|
6072
|
+
* Unless required by applicable law or agreed to in writing,
|
|
6073
|
+
* software distributed under the License is distributed on an
|
|
6074
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
6075
|
+
* KIND, either express or implied. See the License for the
|
|
6076
|
+
* specific language governing permissions and limitations
|
|
6077
|
+
* under the License.
|
|
6078
|
+
*/
|
|
6079
|
+
const identifierFirst = {
|
|
6080
|
+
continue: 'Continuer',
|
|
6081
|
+
'enter.your.username': "Entrez votre nom d'utilisateur",
|
|
6082
|
+
'login.button': 'Se connecter',
|
|
6083
|
+
'login.heading': 'Se connecter',
|
|
6084
|
+
'remember.me': 'Se souvenir de moi sur cet ordinateur',
|
|
6085
|
+
retry: "Échec de la connexion! Veuillez vérifier votre nom d'utilisateur et votre mot de passe et réessayer.",
|
|
6086
|
+
username: "Nom d'utilisateur",
|
|
6087
|
+
};
|
|
6088
|
+
|
|
6089
|
+
var frFR$2 = /*#__PURE__*/Object.freeze({
|
|
6090
|
+
__proto__: null,
|
|
6091
|
+
identifierFirst: identifierFirst
|
|
6092
|
+
});
|
|
6093
|
+
|
|
5988
6094
|
/**
|
|
5989
6095
|
* Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
|
|
5990
6096
|
*
|
|
@@ -40160,7 +40266,7 @@ SignIn$1.PinInput = SignInPinInput;
|
|
|
40160
40266
|
SignIn$1.Image = SignInImage;
|
|
40161
40267
|
SignIn$1.Footer = SignInFooter;
|
|
40162
40268
|
|
|
40163
|
-
var css$4 = "/**\n * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n.asgardeo-basic-auth-skeleton {\n display: flex;\n flex-flow: column nowrap;\n padding: 32px;\n row-gap: 8px;\n}\n.asgardeo-basic-auth-skeleton .skeleton-title {\n margin: 0 auto;\n}\n.asgardeo-basic-auth-skeleton .skeleton-text-field-label {\n margin-top: 12px;\n}\n.asgardeo-basic-auth-skeleton .skeleton-submit-button {\n margin: 20px auto 0;\n border-radius: 20px;\n}\n\n.Paper-basicAuth {\n opacity: 0.5;\n animation: fade-in 0.9s ease-in-out forwards;\n}\n.Paper-basicAuth .asgardeo-basic-auth-alert {\n margin-top: 12px;\n}\n\n@keyframes fade-in {\n to {\n opacity: 1;\n }\n}";
|
|
40269
|
+
var css$4 = "/**\n * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n.asgardeo-basic-auth-skeleton {\n display: flex;\n flex-flow: column nowrap;\n padding: 32px;\n row-gap: 8px;\n}\n.asgardeo-basic-auth-skeleton .skeleton-title {\n margin: 0 auto;\n}\n.asgardeo-basic-auth-skeleton .skeleton-text-field-label {\n margin-top: 12px;\n}\n.asgardeo-basic-auth-skeleton .skeleton-submit-button {\n margin: 20px auto 0;\n border-radius: 20px;\n}\n\n.Paper-basicAuth {\n opacity: 0.5;\n animation: fade-in 0.9s ease-in-out forwards;\n}\n.Paper-basicAuth .asgardeo-basic-auth-alert {\n margin-top: 12px;\n}\n\n.asgardeo-register-link {\n margin-left: 3px;\n}\n\n@keyframes fade-in {\n to {\n opacity: 1;\n }\n}";
|
|
40164
40270
|
n(css$4,{});
|
|
40165
40271
|
|
|
40166
40272
|
/**
|
|
@@ -40176,11 +40282,10 @@ n(css$4,{});
|
|
|
40176
40282
|
*
|
|
40177
40283
|
* @return {ReactElement}
|
|
40178
40284
|
*/
|
|
40179
|
-
const BasicAuth = ({ handleAuthenticate, authenticator, alert, brandingProps, showSelfSignUp, renderLoginOptions, }) => {
|
|
40285
|
+
const BasicAuth = ({ handleAuthenticate, authenticator, children, alert, brandingProps, showSelfSignUp, renderLoginOptions, }) => {
|
|
40180
40286
|
var _a;
|
|
40181
|
-
const [username, setUsername] = useState('');
|
|
40182
40287
|
const [password, setPassword] = useState('');
|
|
40183
|
-
const { isAuthLoading } = useContext(AsgardeoContext);
|
|
40288
|
+
const { isAuthLoading, username, setUsername } = useContext(AsgardeoContext);
|
|
40184
40289
|
const { t, isLoading } = useTranslations({
|
|
40185
40290
|
componentLocaleOverride: brandingProps === null || brandingProps === void 0 ? void 0 : brandingProps.locale,
|
|
40186
40291
|
componentTextOverrides: (_a = brandingProps === null || brandingProps === void 0 ? void 0 : brandingProps.preference) === null || _a === void 0 ? void 0 : _a.text,
|
|
@@ -40189,13 +40294,11 @@ const BasicAuth = ({ handleAuthenticate, authenticator, alert, brandingProps, sh
|
|
|
40189
40294
|
if (isLoading) {
|
|
40190
40295
|
return (jsxRuntimeExports.jsxs(SignIn$1.Paper, { className: "asgardeo-basic-auth-skeleton", children: [jsxRuntimeExports.jsx(Pi, { className: "skeleton-title", variant: "text", width: 100, height: 55 }), jsxRuntimeExports.jsx(Pi, { className: "skeleton-text-field-label", variant: "text", width: 70 }), jsxRuntimeExports.jsx(Pi, { variant: "rectangular", width: 300, height: 40 }), jsxRuntimeExports.jsx(Pi, { className: "skeleton-text-field-label", variant: "text", width: 70 }), jsxRuntimeExports.jsx(Pi, { variant: "rectangular", width: 300, height: 40 }), jsxRuntimeExports.jsx(Pi, { className: "skeleton-submit-button", variant: "rectangular", width: 270, height: 40 })] }));
|
|
40191
40296
|
}
|
|
40192
|
-
return (jsxRuntimeExports.jsxs(SignIn$1.Paper, { className: "Paper-basicAuth", children: [jsxRuntimeExports.jsx(SignIn$1.Typography, { title: true, className: "Typography-basicAuthTitle", children: t(keys.login.login.heading) }), alert && (jsxRuntimeExports.jsx(SignIn$1.Alert, Object.assign({ className: "asgardeo-basic-auth-alert" }, alert === null || alert === void 0 ? void 0 : alert.alertType, { children: t(alert.key) }))), jsxRuntimeExports.jsx(SignIn$1.TextField, { fullWidth: true, autoComplete: "off", label: t(keys.login.username), name: "text", value: username, placeholder: t(keys.login.enter.your.username), onChange: (e) => setUsername(e.target.value) }), jsxRuntimeExports.jsx(SignIn$1.TextField, { fullWidth: true, name: "password", autoComplete: "new-password", label: t(keys.login.password), type: "password", value: password, placeholder: t(keys.login.enter.your.password), onChange: (e) => setPassword(e.target.value) }), jsxRuntimeExports.jsx(SignIn$1.Button, { color: "primary", variant: "contained", type: "submit", fullWidth: true, disabled: isAuthLoading, onClick: () => {
|
|
40297
|
+
return (jsxRuntimeExports.jsxs(SignIn$1.Paper, { className: "Paper-basicAuth", children: [jsxRuntimeExports.jsx(SignIn$1.Typography, { title: true, className: "Typography-basicAuthTitle", children: t(keys.login.login.heading) }), alert && (jsxRuntimeExports.jsx(SignIn$1.Alert, Object.assign({ className: "asgardeo-basic-auth-alert" }, alert === null || alert === void 0 ? void 0 : alert.alertType, { children: t(alert.key) }))), jsxRuntimeExports.jsx(SignIn$1.TextField, { fullWidth: true, autoComplete: "off", label: t(keys.login.username), name: "text", value: username, placeholder: t(keys.login.enter.your.username), onChange: (e) => setUsername(e.target.value) }), jsxRuntimeExports.jsx(SignIn$1.TextField, { fullWidth: true, name: "password", autoComplete: "new-password", label: t(keys.login.password), type: "password", value: password, placeholder: t(keys.login.enter.your.password), onChange: (e) => setPassword(e.target.value) }), children, jsxRuntimeExports.jsx(SignIn$1.Button, { color: "primary", variant: "contained", type: "submit", fullWidth: true, disabled: isAuthLoading, onClick: () => {
|
|
40193
40298
|
handleAuthenticate(authenticator.authenticatorId, {
|
|
40194
40299
|
password,
|
|
40195
40300
|
username,
|
|
40196
40301
|
});
|
|
40197
|
-
setUsername('');
|
|
40198
|
-
setPassword('');
|
|
40199
40302
|
}, children: t(keys.login.button) }), isAuthLoading && (jsxRuntimeExports.jsx("div", { className: "circular-progress-holder-authn", children: jsxRuntimeExports.jsx(ae, { className: "sign-in-button-progress" }) })), showSelfSignUp && (jsxRuntimeExports.jsxs(je, { container: true, children: [jsxRuntimeExports.jsx(SignIn$1.Typography, { children: t(keys.common.prefix.register) }), jsxRuntimeExports.jsx(SignIn$1.Link, { href: "./register", className: "asgardeo-register-link", children: t(keys.common.register) })] })), renderLoginOptions.length !== 0 && jsxRuntimeExports.jsxs(SignIn$1.Divider, { children: [" ", t(keys.common.or), " "] }), renderLoginOptions] }));
|
|
40200
40303
|
};
|
|
40201
40304
|
|
|
@@ -40212,7 +40315,7 @@ n(css$3,{});
|
|
|
40212
40315
|
* @param {AlertType} props.alert - Alert type.
|
|
40213
40316
|
* @return {ReactElement}
|
|
40214
40317
|
*/
|
|
40215
|
-
const EmailOtp = ({ alert, brandingProps, authenticator, handleAuthenticate }) => {
|
|
40318
|
+
const EmailOtp = ({ alert, brandingProps, authenticator, children, handleAuthenticate }) => {
|
|
40216
40319
|
var _a, _b, _c, _d;
|
|
40217
40320
|
const [inputValue, setInputValue] = useState();
|
|
40218
40321
|
const [isContinueLoading, setIsContinueLoading] = useState(false);
|
|
@@ -40239,7 +40342,7 @@ const EmailOtp = ({ alert, brandingProps, authenticator, handleAuthenticate }) =
|
|
|
40239
40342
|
if (isLoading) {
|
|
40240
40343
|
return (jsxRuntimeExports.jsxs(SignIn$1.Paper, { className: "asgardeo-email-otp-skeleton", children: [jsxRuntimeExports.jsx(Pi, { className: "skeleton-title", variant: "text", width: 100, height: 55 }), jsxRuntimeExports.jsx(Pi, { className: "skeleton-text-field-label", variant: "text", width: 70 }), jsxRuntimeExports.jsx(Pi, { variant: "rectangular", width: 300, height: 40 }), jsxRuntimeExports.jsx(Pi, { className: "skeleton-submit-button", variant: "rectangular", width: 270, height: 40 })] }));
|
|
40241
40344
|
}
|
|
40242
|
-
return (jsxRuntimeExports.jsxs(SignIn$1.Paper, { className: "asgardeo-email-otp-paper", children: [jsxRuntimeExports.jsx(SignIn$1.Typography, { title: true, children: t(i18nMapping[param].heading) }), alert && jsxRuntimeExports.jsx(SignIn$1.Alert, Object.assign({}, alert === null || alert === void 0 ? void 0 : alert.alertType, { children: alert.key })), jsxRuntimeExports.jsx(SignIn$1.TextField, { fullWidth: true, autoComplete: "off", label: (_d = t(i18nMapping[param].inputLabel)) !== null && _d !== void 0 ? _d : param, name: "text", value: inputValue, type: param === 'OTPCode' ? 'password' : undefined, placeholder: param === 'username' ? t(i18nMapping[param].placeholder) : undefined, onChange: (e) => setInputValue(e.target.value) }), jsxRuntimeExports.jsxs(SignIn$1.Button, { fullWidth: true, variant: "contained", type: "submit", disabled: isAuthLoading, onClick: () => {
|
|
40345
|
+
return (jsxRuntimeExports.jsxs(SignIn$1.Paper, { className: "asgardeo-email-otp-paper", children: [jsxRuntimeExports.jsx(SignIn$1.Typography, { title: true, children: t(i18nMapping[param].heading) }), alert && jsxRuntimeExports.jsx(SignIn$1.Alert, Object.assign({}, alert === null || alert === void 0 ? void 0 : alert.alertType, { children: alert.key })), jsxRuntimeExports.jsx(SignIn$1.TextField, { fullWidth: true, autoComplete: "off", label: (_d = t(i18nMapping[param].inputLabel)) !== null && _d !== void 0 ? _d : param, name: "text", value: inputValue, type: param === 'OTPCode' ? 'password' : undefined, placeholder: param === 'username' ? t(i18nMapping[param].placeholder) : undefined, onChange: (e) => setInputValue(e.target.value) }), children, jsxRuntimeExports.jsxs(SignIn$1.Button, { fullWidth: true, variant: "contained", type: "submit", disabled: isAuthLoading, onClick: () => {
|
|
40243
40346
|
handleAuthenticate(authenticator.authenticatorId, { [authenticator.requiredParams[0]]: inputValue });
|
|
40244
40347
|
setInputValue('');
|
|
40245
40348
|
setIsResendLoading(false);
|
|
@@ -40252,6 +40355,8 @@ const EmailOtp = ({ alert, brandingProps, authenticator, handleAuthenticate }) =
|
|
|
40252
40355
|
}, children: [t(keys.emailOtp.resend.code), isAuthLoading && isResendLoading && jsxRuntimeExports.jsx(ae, { className: "sign-in-button-progress" })] }))] }));
|
|
40253
40356
|
};
|
|
40254
40357
|
|
|
40358
|
+
var img$7 = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='iso-8859-1'%3f%3e%3c!-- * Copyright (c) 2024%2c WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License%2c * Version 2.0 (the 'License')%3b you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing%2c * software distributed under the License is distributed on an * 'AS IS' BASIS%2c WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND%2c either express or implied. See the License for the * specific language governing permissions and limitations * under the License.--%3e%3csvg xmlns='http://www.w3.org/2000/svg' id='building-icon' class='icon' width='14' height='14' viewBox='0 0 12.601 14'%3e %3cpath id='ldap-outline' class='path fill primary' d='M7.1%2c14H.4a.4.4%2c0%2c0%2c1-.4-.4V.4A.4.4%2c0%2c0%2c1%2c.4%2c0H6.7a.4.4%2c0%2c0%2c1%2c.4.4V3.2h5.1a.4.4%2c0%2c0%2c1%2c.4.4V14Zm0-.6h4.7a.2.2%2c0%2c0%2c0%2c.2-.2V11.32H7.1Zm-.6%2c0V.8A.2.2%2c0%2c0%2c0%2c6.3.6H.8A.2.2%2c0%2c0%2c0%2c.6.8V13.2a.2.2%2c0%2c0%2c0%2c.2.2H2.191V11.12a.4.4%2c0%2c0%2c1%2c.4-.4h1.95a.4.4%2c0%2c0%2c1%2c.4.4V13.4Zm-2.16%2c0V11.32H2.79V13.4ZM12%2c10.72V4a.2.2%2c0%2c0%2c0-.2-.2H7.1v6.92ZM10.471%2c9.1V8.5h.6v.6Zm-1.2%2c0V8.5h.6v.6Zm-1.2%2c0V8.5h.6v.6Zm-2.989%2c0V8.5h.6v.6Zm-1.2%2c0V8.5h.6v.6Zm-1.2%2c0V8.5h.6v.6Zm-1.2%2c0V8.5h.6v.6Zm8.99-1.2V7.3h.6v.6Zm-1.2%2c0V7.3h.6v.6Zm-1.2%2c0V7.3h.6v.6Zm-2.989%2c0V7.3h.6v.6Zm-1.2%2c0V7.3h.6v.6Zm-1.2%2c0V7.3h.6v.6Zm-1.2%2c0V7.3h.6v.6Zm8.99-1.2V6.1h.6v.6Zm-1.2%2c0V6.1h.6v.6Zm-1.2%2c0V6.1h.6v.6Zm-2.989%2c0V6.1h.6v.6Zm-1.2%2c0V6.1h.6v.6Zm-1.2%2c0V6.1h.6v.6Zm-1.2%2c0V6.1h.6v.6Zm8.99-1.2V4.9h.6v.6Zm-1.2%2c0V4.9h.6v.6Zm-1.2%2c0V4.9h.6v.6Zm-2.989%2c0V4.9h.6v.6Zm-1.2%2c0V4.9h.6v.6Zm-1.2%2c0V4.9h.6v.6Zm-1.2%2c0V4.9h.6v.6Zm3.6-1.2V3.7h.6v.6Zm-1.2%2c0V3.7h.6v.6Zm-1.2%2c0V3.7h.6v.6Zm-1.2%2c0V3.7h.6v.6Zm3.6-1.2V2.5h.6v.6Zm-1.2%2c0V2.5h.6v.6Zm-1.2%2c0V2.5h.6v.6Zm-1.2%2c0V2.5h.6v.6Zm3.6-1.2V1.3h.6v.6Zm-1.2%2c0V1.3h.6v.6Zm-1.2%2c0V1.3h.6v.6Zm-1.2%2c0V1.3h.6v.6Z' fill='%23464646'/%3e%3c/svg%3e";
|
|
40359
|
+
|
|
40255
40360
|
var img$6 = "data:image/svg+xml,%3c!-- * Copyright (c) 2024%2c WSO2 Inc. (http://www.wso2.org). * * WSO2 Inc. licenses this file to you under the Apache License%2c * Version 2.0 (the 'License')%3b you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing%2c * software distributed under the License is distributed on an * 'AS IS' BASIS%2c WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND%2c either express or implied. See the License for the * specific language governing permissions and limitations * under the License.--%3e%3csvg id='email-solid-icon' class='icon' width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 4C0 2.89543 0.895431 2 2 2H14C15.1046 2 16 2.89561 16 4.00013V4.00476V4.00939V4.01402V4.01865V4.02328V4.02791V4.03253V4.03715V4.04177V4.04639V4.05101V4.05563V4.06024V4.06485V4.06947V4.07408V4.07868V4.08329V4.0879V4.0925V4.09711V4.10171V4.10631V4.11091V4.1155V4.1201V4.12469V4.12929V4.13388V4.13847V4.14306V4.14765V4.15224V4.15682V4.16141V4.16599V4.17057V4.17516V4.17974V4.18431V4.18889V4.19347V4.19805V4.20262V4.20719V4.21177V4.21634V4.22091V4.22548V4.23005V4.23462V4.23918V4.24375V4.24832V4.25288V4.25744V4.26201V4.26657V4.27113V4.27569V4.28025V4.28481V4.28937V4.29392V4.29848V4.30304V4.30759V4.31215V4.3167V4.32125V4.32581V4.33036V4.33491V4.33946V4.34401V4.34856V4.35311V4.35766V4.36221V4.36675V4.3713V4.37585V4.38039V4.38494V4.38949V4.39403V4.39858V4.40312V4.40767V4.41221V4.41675V4.4213V4.42584V4.43038V4.43492V4.43947V4.44401V4.44855V4.45309V4.45763V4.46217V4.46672V4.47126V4.4758V4.48034V4.48488V4.48942V4.49396V4.4985V4.50304V4.50758V4.51212V4.51667V4.52121V4.52575V4.53029V4.53483V4.53937V4.54391V4.54845V4.553V4.55754V4.56208V4.56662V4.57116V4.57571V4.58025V4.58479V4.58934V4.59388V4.59843V4.60297V4.60752V4.61206V4.61661V4.62115V4.6257V4.63025V4.63479V4.63934V4.64389V4.64844V4.65299V4.65754V4.66209V4.66664V4.67119V4.67574V4.6803V4.68485V4.6894V4.69396V4.69851V4.70307V4.70763V4.71219V4.71674V4.7213V4.72586V4.73042V4.73498V4.73955V4.74411V4.74867V4.75324V4.7578V4.76237V4.76694V4.77151V4.77608V4.78065V4.78522V4.78979V4.79436V4.79894V4.80351V4.80809V4.81267V4.81724V4.82182V4.8264V4.83099V4.83557V4.84015V4.84474V4.84933V4.85391V4.8585V4.86309V4.86768V4.87228V4.87687V4.88147V4.88606V4.89066V4.89526V4.89986V4.90446V4.90907V4.91367V4.91828V4.92288V4.92749V4.9321V4.93672V4.94133V4.94595V4.95056V4.95518V4.9598V4.96442V4.96904V4.97367V4.9783V4.98292V4.98755V4.99218V4.99682V5.00145V5.00609V5.01073V5.01537V5.02001V5.02465V5.0293V5.03394V5.03859V5.04324V5.0479V5.05255V5.05721V5.06187V5.06653V5.07119V5.07585V5.08052V5.08519V5.08986V5.09453V5.0992V5.10388V5.10856V5.11324V5.11792V5.12261V5.12729V5.13198V5.13667V5.14137V5.14606V5.15076V5.15546V5.16016V5.16487V5.16958V5.17428V5.179V5.18371V5.18843V5.19315V5.19787V5.20259V5.20731V5.21204V5.21677V5.22151V5.22624V5.23098V5.23572V5.24046V5.24521V5.24996V5.25471V5.25946V5.26422V5.26898V5.27374V5.2785V5.28327V5.28804V5.29281V5.29758V5.30236V5.30714V5.31192V5.31671V5.3215V5.32629V5.33108V5.33588V5.34068V5.34548V5.35028V5.35509V5.3599V5.36472V5.36953V5.37435V5.37918V5.384V5.38883V5.39366V5.3985V5.40334V5.40818V5.41302V5.41787V5.42272V5.42757V5.43243V5.43729V5.44215V5.44702V5.45189V5.45676V5.46164V5.46652V5.4714V5.47628V5.48117V5.48606V5.49096V5.49586V5.50076V5.50567V5.51058V5.51549V5.52041V5.52532V5.53025V5.53517V5.5401V5.54504V5.54997V5.55491V5.55986V5.56481V5.56976V5.57471V5.57967V5.58463V5.5896V5.59457V5.59954V5.60452V5.6095V5.61448V5.61947V5.62446V5.62946V5.63446V5.63946V5.64447V5.64948V5.65449V5.65951V5.66453V5.66956V5.67459V5.67962V5.68466V5.6897V5.69475V5.6998V5.70485V5.70991V5.71497V5.72004V5.72511V5.73019V5.73526V5.74035V5.74543V5.75052V5.75562V5.76072V5.76582V5.77093V5.77604V5.78116V5.78628V5.7914V5.79653V5.80167V5.8068V5.81194V5.81709V5.82224V5.8274V5.83256V5.83772V5.84289V5.84806V5.85324V5.85842V5.86361V5.8688V5.87399V5.87919V5.8844V5.88961V5.89482V5.90004V5.90526V5.91049V5.91572V5.92096V5.9262V5.93145V5.9367V5.94195V5.94721V5.95248V5.95775V5.96303V5.96831V5.97359V5.97888V5.98417V5.98947V5.99478V6.00009V6.0054V6.01072V6.01604V6.02137V6.0267V6.03204V6.03739V6.04274V6.04809V6.05345V6.05881V6.06418V6.06956V6.07494V6.08032V6.08571V6.09111V6.09651V6.10191V6.10732V6.11274V6.11816V6.12359V6.12902V6.13445V6.1399V6.14534V6.1508V6.15626V6.16172V6.16719V6.17266V6.17814V6.18363V6.18912V6.19462V6.20012V6.20563V6.21114V6.21666V6.22218V6.22771V6.23325V6.23879V6.24433V6.24989V6.25544V6.26101V6.26658V6.27215V6.27773V6.28332V6.28891V6.29451V6.30011V6.30572V6.31133V6.31696V6.32258V6.32822V6.33385V6.3395V6.34515V6.35081V6.35647V6.36214V6.36781V6.37349V6.37918V6.38487V6.39057V6.39627V6.40198V6.4077V6.41342V6.41915V6.42488V6.43062V6.43637V6.44212V6.44788V6.45365V6.45942V6.4652V6.47098V6.47677V6.48257V6.48837V6.49418V6.5V9C16 9.27614 15.7761 9.5 15.5 9.5C15.2239 9.5 15 9.27614 15 9V6.5V6.49418V6.48837V6.48257V6.47677V6.47098V6.4652V6.45942V6.45365V6.44788V6.44212V6.43637V6.43062V6.42488V6.41915V6.41342V6.4077V6.40198V6.39627V6.39057V6.38487V6.37918V6.37349V6.36781V6.36214V6.35647V6.35081V6.34515V6.3395V6.33385V6.32822V6.32258V6.31696V6.31133V6.30572V6.30011V6.29451V6.28891V6.28332V6.27773V6.27215V6.26658V6.26101V6.25544V6.24989V6.24433V6.23879V6.23325V6.22771V6.22218V6.21666V6.21114V6.20563V6.20012V6.19462V6.18912V6.18363V6.17814V6.17266V6.16719V6.16172V6.15626V6.1508V6.14534V6.1399V6.13445V6.12902V6.12359V6.11816V6.11274V6.10732V6.10191V6.09651V6.09111V6.08571V6.08032V6.07494V6.06956V6.06418V6.05881V6.05345V6.04809V6.04274V6.03739V6.03204V6.0267V6.02137V6.01604V6.01072V6.0054V6.00009V5.99478V5.98947V5.98417V5.97888V5.97359V5.96831V5.96303V5.95775V5.95248V5.94721V5.94195V5.9367V5.93145V5.9262V5.92096V5.91572V5.91049V5.90526V5.90004V5.89482V5.88961V5.8844V5.87919V5.87399V5.8688V5.86361V5.85842V5.85324V5.84806V5.84289V5.83772V5.83256V5.8274V5.82224V5.81709V5.81194V5.8068V5.80167V5.79653V5.7914V5.78628V5.78116V5.77604V5.77093V5.76582V5.76072V5.75562V5.75052V5.74543V5.74035V5.73526V5.73019V5.72511V5.72004V5.71497V5.70991V5.70485V5.6998V5.69475V5.6897V5.68466V5.67962V5.67459V5.66956V5.66453V5.65951V5.65449V5.64948V5.64447V5.63946V5.63446V5.62946V5.62446V5.61947V5.61448V5.6095V5.60452V5.59954V5.59457V5.5896V5.58463V5.57967V5.57471V5.56976V5.56481V5.55986V5.55491V5.54997V5.54504V5.5401V5.53517V5.53025V5.52532V5.52041V5.51549V5.51058V5.50567V5.50076V5.49586V5.49096V5.48606V5.48117V5.47628V5.4714V5.46652V5.46164V5.45676V5.45189V5.44702V5.44215V5.43729V5.43243V5.42757V5.42272V5.41787V5.41302V5.40818V5.40334V5.3985V5.39366V5.38883V5.384V5.37918V5.37435V5.36953V5.36472V5.3599V5.35509V5.35028V5.34548V5.34068V5.33588V5.33108V5.32629V5.3215V5.31671V5.31192V5.30714V5.30236V5.29758V5.29281V5.28804V5.28327V5.2785V5.27374V5.26898V5.26422V5.25946V5.25471V5.24996V5.24521V5.24046V5.23572V5.23098V5.22624V5.22151V5.21677V5.21204V5.20731V5.20259V5.19787V5.19315V5.18843V5.18371V5.179V5.17428V5.16958V5.16487V5.16016V5.15546V5.15076V5.14606V5.14137V5.13667V5.13198V5.12729V5.12261V5.11792V5.11324V5.10856V5.10388V5.0992V5.09453V5.08986V5.08519V5.08052V5.07585V5.07119V5.06653V5.06187V5.05721V5.05255V5.0479V5.04324V5.03859V5.03394V5.0293V5.02465V5.02001V5.01537V5.01073V5.00609V5.00145V4.99682V4.99218V4.98755V4.98292V4.9783V4.97367V4.96904V4.96442V4.9598V4.95518V4.95056V4.94595V4.94133V4.93672V4.9321V4.92749V4.92288V4.91828V4.91367V4.90907V4.90446V4.89986V4.89526V4.89066V4.88606V4.88147V4.87687V4.87228V4.86768V4.86309V4.8585V4.85391V4.84933V4.84474V4.84015V4.83557V4.83099V4.8264V4.82182V4.81724V4.81267V4.80809V4.80351V4.79894V4.79436V4.78979V4.78522V4.78065V4.77608V4.77151V4.76694V4.76237V4.7578V4.75324V4.74867V4.74411V4.73955V4.73498V4.73042V4.72586V4.7213V4.71674V4.71219V4.70763V4.70307V4.69851V4.69396V4.6894V4.68485V4.6803V4.67574V4.67119V4.66664V4.66209V4.65754V4.65299V4.64844V4.64389V4.63934V4.63479V4.63025V4.6257V4.62115V4.61661V4.61206V4.60752V4.60297V4.59843V4.59388V4.58934V4.58479V4.58025V4.57571V4.57116V4.56662V4.56208V4.55754V4.553V4.54845V4.54391V4.53937V4.53483V4.53029V4.52575V4.52121V4.51667V4.51212V4.50758V4.50304V4.4985V4.49396V4.48942V4.48488V4.48034V4.4758V4.47126V4.46672V4.46217V4.45763V4.45309V4.44855V4.44401V4.43947V4.43492V4.43038V4.42584V4.4213V4.41675V4.41221V4.40767V4.40312V4.39858V4.39403V4.38949V4.38494V4.38039V4.37585V4.3713V4.36675V4.36221V4.35766V4.35311V4.34856V4.34401V4.33946V4.33491V4.33036V4.32581V4.32125V4.3167V4.31215V4.30759V4.30304V4.29848V4.29392V4.28937V4.28481V4.28025V4.27569V4.27113V4.26657V4.26201V4.25744V4.25288V4.24832V4.24375V4.23918V4.23462V4.23005V4.22548V4.22091V4.21634V4.21177V4.20719V4.20262V4.19805V4.19347V4.18889V4.18431V4.17974V4.17516V4.17057V4.16599V4.16141V4.15682V4.15224V4.14765V4.14306V4.13847V4.13388V4.12929V4.12469V4.1201V4.1155V4.11445L8.58124 8.69928C8.23354 8.94764 7.76646 8.94764 7.41876 8.69928L1 4.11445V12C1 12.5523 1.44772 13 2 13H4C4.27614 13 4.5 13.2239 4.5 13.5C4.5 13.7761 4.27614 14 4 14H2C0.89543 14 0 13.1046 0 12V4ZM14 3C14.2163 3 14.4165 3.06869 14.5802 3.18544L8 7.88555L1.41982 3.18542C1.58343 3.06868 1.78369 3 2 3H14ZM8.62718 11.3369C8.58208 10.8877 7.91792 10.8877 7.87282 11.3369L7.74264 12.6336L6.53863 12.0964C6.12154 11.9103 5.78945 12.4774 6.16145 12.7405L7.23528 13.5L6.16145 14.2595C5.78945 14.5226 6.12154 15.0897 6.53863 14.9036L7.74264 14.3664L7.87282 15.6631C7.91792 16.1123 8.58208 16.1123 8.62718 15.6631L8.75736 14.3664L9.96137 14.9036C10.3785 15.0897 10.7105 14.5226 10.3385 14.2595L9.26472 13.5L10.3385 12.7405C10.7105 12.4774 10.3785 11.9103 9.96137 12.0964L8.75736 12.6336L8.62718 11.3369ZM14.1272 11.3369C14.0821 10.8877 13.4179 10.8877 13.3728 11.3369L13.2426 12.6336L12.0386 12.0964C11.6215 11.9103 11.2895 12.4774 11.6615 12.7405L12.7353 13.5L11.6615 14.2595C11.2895 14.5226 11.6215 15.0897 12.0386 14.9036L13.2426 14.3664L13.3728 15.6631C13.4179 16.1123 14.0821 16.1123 14.1272 15.6631L14.2574 14.3664L15.4614 14.9036C15.8785 15.0897 16.2105 14.5226 15.8385 14.2595L14.7647 13.5L15.8385 12.7405C16.2105 12.4774 15.8785 11.9103 15.4614 12.0964L14.2574 12.6336L14.1272 11.3369Z' fill='black'/%3e%3c/svg%3e";
|
|
40256
40361
|
|
|
40257
40362
|
var img$5 = "data:image/svg+xml,%3c%3fxml version='1.0' encoding='iso-8859-1'%3f%3e%3c!-- * Copyright (c) 2024%2c WSO2 Inc. (http://www.wso2.org). * * WSO2 Inc. licenses this file to you under the Apache License%2c * Version 2.0 (the 'License')%3b you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing%2c * software distributed under the License is distributed on an * 'AS IS' BASIS%2c WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND%2c either express or implied. See the License for the * specific language governing permissions and limitations * under the License.--%3e%3csvg version='1.1' class='icon' id='sms-icon' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='14px' height='14px' viewBox='0 0 490 490' xml:space='preserve'%3e %3cg%3e %3cg%3e %3cpath class='path fill primary' d='M87.412%2c205.872c5.456%2c3.318%2c16.772%2c7.22%2c25.547%2c7.22c8.969%2c0%2c12.676-3.124%2c12.676-7.997c0-4.888-2.93-7.22-14.037-10.927 c-19.702-6.637-27.311-17.355-27.117-28.671c0-17.744%2c15.218-31.198%2c38.806-31.198c11.122%2c0%2c21.078%2c2.526%2c26.923%2c5.456 l-5.262%2c20.48c-4.29-2.347-12.482-5.471-20.674-5.471c-7.22%2c0-11.316%2c2.93-11.316%2c7.803c0%2c4.485%2c3.707%2c6.832%2c15.412%2c10.927 c18.133%2c6.234%2c25.741%2c15.412%2c25.936%2c29.449c0%2c17.744-14.037%2c30.809-41.348%2c30.809c-12.482%2c0-23.604-2.721-30.809-6.622 L87.412%2c205.872z'/%3e %3cpath class='path fill primary' d='M172.23%2c166.856c0-11.884-0.389-22.034-0.777-30.42h24.964l1.36%2c12.871h0.583c4.096-6.039%2c12.482-15.008%2c28.866-15.008 c12.288%2c0%2c22.034%2c6.233%2c26.13%2c16.174h0.389c3.513-4.873%2c7.803-8.775%2c12.288-11.495c5.277-3.124%2c11.122-4.679%2c18.148-4.679 c18.327%2c0%2c32.184%2c12.871%2c32.184%2c41.333v56.177h-28.866v-51.872c0-13.857-4.5-21.855-14.052-21.855 c-6.817%2c0-11.705%2c4.679-13.648%2c10.344c-0.777%2c2.138-1.166%2c5.262-1.166%2c7.609v55.773h-28.866v-53.441 c0-12.093-4.29-20.285-13.663-20.285c-7.594%2c0-12.093%2c5.86-13.842%2c10.733c-0.972%2c2.332-1.166%2c5.068-1.166%2c7.415v55.579H172.23 V166.856z'/%3e %3cpath class='path fill primary' d='M339.729%2c205.872c5.456%2c3.318%2c16.772%2c7.22%2c25.547%2c7.22c8.969%2c0%2c12.676-3.124%2c12.676-7.997 c0-4.888-2.93-7.22-14.037-10.927c-19.702-6.637-27.311-17.355-27.117-28.671c0-17.744%2c15.218-31.198%2c38.807-31.198 c11.122%2c0%2c21.063%2c2.526%2c26.922%2c5.456l-5.262%2c20.48c-4.29-2.347-12.482-5.471-20.674-5.471c-7.22%2c0-11.316%2c2.93-11.316%2c7.803 c0%2c4.485%2c3.707%2c6.832%2c15.412%2c10.927c18.133%2c6.234%2c25.742%2c15.412%2c25.936%2c29.449c0%2c17.744-14.037%2c30.809-41.348%2c30.809 c-12.482%2c0-23.604-2.721-30.809-6.622L339.729%2c205.872z'/%3e %3c/g%3e %3cg%3e %3cpath class='path fill secondary' d='M383.947%2c490L230.694%2c364.252H50.713c-27.924%2c0-50.631-23.111-50.631-51.528V51.528C0.082%2c23.111%2c22.789%2c0%2c50.713%2c0 h388.574c27.924%2c0%2c50.631%2c23.111%2c50.631%2c51.528v261.197c0%2c28.417-22.707%2c51.528-50.631%2c51.528h-55.34V490z M50.713%2c30.615 c-11.032%2c0-20.016%2c9.388-20.016%2c20.913v261.197c0%2c11.525%2c8.984%2c20.913%2c20.016%2c20.913h190.923l111.696%2c91.635v-91.635h85.954 c11.032%2c0%2c20.016-9.388%2c20.016-20.913V51.528c0-11.525-8.984-20.913-20.016-20.913H50.713z'/%3e %3c/g%3e %3c/g%3e%3c/svg%3e";
|
|
@@ -40284,9 +40389,12 @@ const images = {
|
|
|
40284
40389
|
* @param {Function} props.handleOnClick - On click handler.
|
|
40285
40390
|
* @return {ReactElement}
|
|
40286
40391
|
*/
|
|
40287
|
-
const LoginOptionsBox = ({ isAuthLoading, socialName, displayName, handleOnClick, }) =>
|
|
40392
|
+
const LoginOptionsBox = ({ isAuthLoading, socialName, displayName, handleOnClick, }) => {
|
|
40393
|
+
var _a;
|
|
40394
|
+
return (jsxRuntimeExports.jsx(SignIn$1.Button, { className: `Button-${socialName.toLowerCase()}`, social: true, startIcon: jsxRuntimeExports.jsx("img", { className: "social-login-img", src: (_a = images[socialName]) !== null && _a !== void 0 ? _a : img$7, alt: socialName }), onClick: handleOnClick, disabled: isAuthLoading, children: displayName }));
|
|
40395
|
+
};
|
|
40288
40396
|
|
|
40289
|
-
const SmsOtp = ({ alert, brandingProps, authenticator, handleAuthenticate }) => {
|
|
40397
|
+
const SmsOtp = ({ alert, brandingProps, authenticator, children, handleAuthenticate, }) => {
|
|
40290
40398
|
var _a;
|
|
40291
40399
|
const [otp, setOtp] = useState();
|
|
40292
40400
|
const { isLoading, t } = useTranslations({
|
|
@@ -40297,7 +40405,7 @@ const SmsOtp = ({ alert, brandingProps, authenticator, handleAuthenticate }) =>
|
|
|
40297
40405
|
if (isLoading) {
|
|
40298
40406
|
return (jsxRuntimeExports.jsx("div", { className: "circular-progress-holder", children: jsxRuntimeExports.jsx(ae, { className: "circular-progress" }) }));
|
|
40299
40407
|
}
|
|
40300
|
-
return (jsxRuntimeExports.jsxs(SignIn$1.Paper, { children: [jsxRuntimeExports.jsx(SignIn$1.Typography, { title: true, children: t(keys.smsOtp.sms.otp.heading) }), jsxRuntimeExports.jsx(SignIn$1.Typography, { subtitle: true, children: t(keys.smsOtp.sms.otp.subheading) }), alert && jsxRuntimeExports.jsx(SignIn$1.Alert, Object.assign({}, alert === null || alert === void 0 ? void 0 : alert.alertType, { children: alert.key })), jsxRuntimeExports.jsx(SignIn$1.PinInput, { length: 6, onPinChange: setOtp }), jsxRuntimeExports.jsx(SignIn$1.Button, { fullWidth: true, variant: "contained", type: "submit", onClick: () => {
|
|
40408
|
+
return (jsxRuntimeExports.jsxs(SignIn$1.Paper, { children: [jsxRuntimeExports.jsx(SignIn$1.Typography, { title: true, children: t(keys.smsOtp.sms.otp.heading) }), jsxRuntimeExports.jsx(SignIn$1.Typography, { subtitle: true, children: t(keys.smsOtp.sms.otp.subheading) }), alert && jsxRuntimeExports.jsx(SignIn$1.Alert, Object.assign({}, alert === null || alert === void 0 ? void 0 : alert.alertType, { children: alert.key })), jsxRuntimeExports.jsx(SignIn$1.PinInput, { length: 6, onPinChange: setOtp }), children, jsxRuntimeExports.jsx(SignIn$1.Button, { fullWidth: true, variant: "contained", type: "submit", onClick: () => {
|
|
40301
40409
|
handleAuthenticate(authenticator.authenticatorId, { OTPCode: otp });
|
|
40302
40410
|
setOtp('');
|
|
40303
40411
|
}, children: t(keys.smsOtp.continue) }), jsxRuntimeExports.jsx(SignIn$1.Button, { className: "email-otp-resend-button", onClick: () => handleAuthenticate(authenticator.authenticatorId), color: "secondary", variant: "contained", children: t(keys.smsOtp.resend.code) })] }));
|
|
@@ -40317,7 +40425,7 @@ n(css$2,{});
|
|
|
40317
40425
|
*
|
|
40318
40426
|
* @return {ReactElement}
|
|
40319
40427
|
*/
|
|
40320
|
-
const Totp = ({ brandingProps, authenticator, handleAuthenticate, alert }) => {
|
|
40428
|
+
const Totp = ({ brandingProps, authenticator, children, handleAuthenticate, alert, }) => {
|
|
40321
40429
|
var _a;
|
|
40322
40430
|
const [totp, setTotp] = useState();
|
|
40323
40431
|
const { isAuthLoading } = useContext(AsgardeoContext);
|
|
@@ -40329,7 +40437,7 @@ const Totp = ({ brandingProps, authenticator, handleAuthenticate, alert }) => {
|
|
|
40329
40437
|
if (isLoading) {
|
|
40330
40438
|
return (jsxRuntimeExports.jsxs(SignIn$1.Paper, { className: "asgardeo-totp-skeleton", children: [jsxRuntimeExports.jsx(Pi, { className: "skeleton-title", variant: "text", width: 100, height: 55 }), jsxRuntimeExports.jsx(Pi, { className: "skeleton-title", variant: "text", width: 280, height: 35 }), jsxRuntimeExports.jsxs(je, { container: true, children: [jsxRuntimeExports.jsx(Pi, { className: "skeleton-pin-box", variant: "rectangular", width: 45, height: 50 }), jsxRuntimeExports.jsx(Pi, { className: "skeleton-pin-box", variant: "rectangular", width: 45, height: 50 }), jsxRuntimeExports.jsx(Pi, { className: "skeleton-pin-box", variant: "rectangular", width: 45, height: 50 }), jsxRuntimeExports.jsx(Pi, { className: "skeleton-pin-box", variant: "rectangular", width: 45, height: 50 }), jsxRuntimeExports.jsx(Pi, { className: "skeleton-pin-box", variant: "rectangular", width: 45, height: 50 }), jsxRuntimeExports.jsx(Pi, { className: "skeleton-pin-box", variant: "rectangular", width: 45, height: 50 })] }), jsxRuntimeExports.jsx(Pi, { className: "skeleton-submit-button", variant: "rectangular", width: 300, height: 40 })] }));
|
|
40331
40439
|
}
|
|
40332
|
-
return (jsxRuntimeExports.jsxs(SignIn$1.Paper, { children: [jsxRuntimeExports.jsx(SignIn$1.Typography, { title: true, children: t(keys.totp.heading) }), alert && (jsxRuntimeExports.jsx(SignIn$1.Alert, Object.assign({ className: "asgardeo-totp-alert" }, alert === null || alert === void 0 ? void 0 : alert.alertType, { children: t(alert.key) }))), jsxRuntimeExports.jsx(SignIn$1.Typography, { subtitle: true, children: t(keys.totp.enter.verification.code.got.by.device) }), jsxRuntimeExports.jsx(SignIn$1.PinInput, { length: 6, onPinChange: setTotp, pinValue: totp }), jsxRuntimeExports.jsx(SignIn$1.Button, { color: "primary", variant: "contained", className: "oxygen-sign-in-cta", type: "submit", fullWidth: true, disabled: !totp, onClick: () => {
|
|
40440
|
+
return (jsxRuntimeExports.jsxs(SignIn$1.Paper, { children: [jsxRuntimeExports.jsx(SignIn$1.Typography, { title: true, children: t(keys.totp.heading) }), alert && (jsxRuntimeExports.jsx(SignIn$1.Alert, Object.assign({ className: "asgardeo-totp-alert" }, alert === null || alert === void 0 ? void 0 : alert.alertType, { children: t(alert.key) }))), jsxRuntimeExports.jsx(SignIn$1.Typography, { subtitle: true, children: t(keys.totp.enter.verification.code.got.by.device) }), jsxRuntimeExports.jsx(SignIn$1.PinInput, { length: 6, onPinChange: setTotp, pinValue: totp }), children, jsxRuntimeExports.jsx(SignIn$1.Button, { color: "primary", variant: "contained", className: "oxygen-sign-in-cta", type: "submit", fullWidth: true, disabled: !totp, onClick: () => {
|
|
40333
40441
|
handleAuthenticate(authenticator.authenticatorId, { token: totp });
|
|
40334
40442
|
setTotp('');
|
|
40335
40443
|
}, children: t(keys.totp.continue) }), isAuthLoading && (jsxRuntimeExports.jsx("div", { className: "circular-progress-holder-authn", children: jsxRuntimeExports.jsx(ae, { className: "sign-in-button-progress" }) })), jsxRuntimeExports.jsxs(SignIn$1.Typography, { subtitle: true, children: [t(keys.totp.enroll.message1), jsxRuntimeExports.jsx("br", {}), t(keys.totp.enroll.message2)] })] }));
|
|
@@ -40380,7 +40488,7 @@ const BrandingPreferenceContext = createContext(undefined);
|
|
|
40380
40488
|
*/
|
|
40381
40489
|
const useAuthentication = () => {
|
|
40382
40490
|
const contextValue = useContext(AsgardeoContext);
|
|
40383
|
-
const {
|
|
40491
|
+
const { accessToken, authResponse, isAuthenticated, setUsername, user, username } = contextValue;
|
|
40384
40492
|
const signOut$1 = () => {
|
|
40385
40493
|
signOut().then(() => {
|
|
40386
40494
|
sessionStorage.clear();
|
|
@@ -40389,7 +40497,15 @@ const useAuthentication = () => {
|
|
|
40389
40497
|
}
|
|
40390
40498
|
});
|
|
40391
40499
|
};
|
|
40392
|
-
return {
|
|
40500
|
+
return {
|
|
40501
|
+
accessToken,
|
|
40502
|
+
authResponse,
|
|
40503
|
+
isAuthenticated,
|
|
40504
|
+
setUsername,
|
|
40505
|
+
signOut: signOut$1,
|
|
40506
|
+
user,
|
|
40507
|
+
username,
|
|
40508
|
+
};
|
|
40393
40509
|
};
|
|
40394
40510
|
|
|
40395
40511
|
/**
|
|
@@ -44268,6 +44384,37 @@ class SPACryptoUtils {
|
|
|
44268
44384
|
var css$1 = "/**\n * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n.Box-asgardeoSignIn {\n min-width: 350px;\n min-height: 75vh;\n}\n.Box-asgardeoSignIn .email-otp-resend-button {\n margin-top: 0;\n}\n.Box-asgardeoSignIn .multiple-otions-title {\n margin: 16px 0 34px;\n}\n.Box-asgardeoSignIn .asgardeo-multiple-options-paper {\n padding-bottom: 64px;\n}\n.Box-asgardeoSignIn .asgardeo-multiple-options-paper .asgardeo-sign-in-alert {\n margin-bottom: 24px;\n}\n\n.Box-circularProgressHolder {\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 75vh;\n}\n.Box-circularProgressHolder .circular-progress {\n color: rgb(214, 211, 211) !important;\n}\n\n.asgardeo-sign-in-footer,\n.asgardeo-sign-in-logo {\n opacity: 0.5;\n animation: fade-in 0.7s ease-in-out forwards;\n}\n\n@keyframes fade-in {\n to {\n opacity: 1;\n }\n}\n.circular-progress-holder-authn {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-grow: 1;\n}\n.circular-progress-holder-authn .sign-in-button-progress {\n color: var(--oxygen-palette-primary-main);\n margin: 0 auto !important;\n max-height: 25px;\n max-width: 25px;\n margin-left: 12px;\n}";
|
|
44269
44385
|
n(css$1,{});
|
|
44270
44386
|
|
|
44387
|
+
/**
|
|
44388
|
+
* This component renders the IdentifierFirst authentication form.
|
|
44389
|
+
*
|
|
44390
|
+
* @param {IdentifierFirstProps} props - Props injected to the IdentifierFirst authentication component.
|
|
44391
|
+
* @param {BrandingProps} props.brandingProps - Branding props.
|
|
44392
|
+
* @param {Function} props.handleAuthenticate - Callback to handle authentication.
|
|
44393
|
+
* @param {Authenticator} props.authenticator - Authenticator.
|
|
44394
|
+
* @param {AlertType} props.alert - Alert type.
|
|
44395
|
+
* @param {ReactElement[]} props.renderLoginOptions - Login options.
|
|
44396
|
+
* @param {boolean} props.showSelfSignUp - Show self sign up.
|
|
44397
|
+
*
|
|
44398
|
+
* @return {ReactElement}
|
|
44399
|
+
*/
|
|
44400
|
+
const IdentifierFirst = ({ handleAuthenticate, authenticator, alert, brandingProps, children, showSelfSignUp, renderLoginOptions, }) => {
|
|
44401
|
+
var _a;
|
|
44402
|
+
const { isAuthLoading, username, setUsername } = useContext(AsgardeoContext);
|
|
44403
|
+
const { t, isLoading } = useTranslations({
|
|
44404
|
+
componentLocaleOverride: brandingProps === null || brandingProps === void 0 ? void 0 : brandingProps.locale,
|
|
44405
|
+
componentTextOverrides: (_a = brandingProps === null || brandingProps === void 0 ? void 0 : brandingProps.preference) === null || _a === void 0 ? void 0 : _a.text,
|
|
44406
|
+
screen: ScreenType.Login,
|
|
44407
|
+
});
|
|
44408
|
+
if (isLoading) {
|
|
44409
|
+
return (jsxRuntimeExports.jsxs(SignIn$1.Paper, { className: "asgardeo-basic-auth-skeleton", children: [jsxRuntimeExports.jsx(Pi, { className: "skeleton-title", variant: "text", width: 100, height: 55 }), jsxRuntimeExports.jsx(Pi, { className: "skeleton-text-field-label", variant: "text", width: 70 }), jsxRuntimeExports.jsx(Pi, { variant: "rectangular", width: 300, height: 40 }), jsxRuntimeExports.jsx(Pi, { className: "skeleton-text-field-label", variant: "text", width: 70 }), jsxRuntimeExports.jsx(Pi, { variant: "rectangular", width: 300, height: 40 }), jsxRuntimeExports.jsx(Pi, { className: "skeleton-submit-button", variant: "rectangular", width: 270, height: 40 })] }));
|
|
44410
|
+
}
|
|
44411
|
+
return (jsxRuntimeExports.jsxs(SignIn$1.Paper, { className: "Paper-basicAuth", children: [jsxRuntimeExports.jsx(SignIn$1.Typography, { title: true, className: "Typography-basicAuthTitle", children: t(keys.login.login.heading) }), alert && (jsxRuntimeExports.jsx(SignIn$1.Alert, Object.assign({ className: "asgardeo-basic-auth-alert" }, alert === null || alert === void 0 ? void 0 : alert.alertType, { children: t(alert.key) }))), jsxRuntimeExports.jsx(SignIn$1.TextField, { fullWidth: true, autoComplete: "off", label: t(keys.login.username), name: "text", value: username, placeholder: t(keys.login.enter.your.username), onChange: (e) => setUsername(e.target.value) }), children, jsxRuntimeExports.jsx(SignIn$1.Button, { color: "primary", variant: "contained", type: "submit", fullWidth: true, disabled: isAuthLoading, onClick: () => {
|
|
44412
|
+
handleAuthenticate(authenticator.authenticatorId, {
|
|
44413
|
+
username,
|
|
44414
|
+
});
|
|
44415
|
+
}, children: t(keys.login.button) }), isAuthLoading && (jsxRuntimeExports.jsx("div", { className: "circular-progress-holder-authn", children: jsxRuntimeExports.jsx(ae, { className: "sign-in-button-progress" }) })), showSelfSignUp && (jsxRuntimeExports.jsxs(je, { container: true, children: [jsxRuntimeExports.jsx(SignIn$1.Typography, { children: t(keys.common.prefix.register) }), jsxRuntimeExports.jsx(SignIn$1.Link, { href: "./register", className: "asgardeo-register-link", children: t(keys.common.register) })] })), renderLoginOptions.length !== 0 && jsxRuntimeExports.jsxs(SignIn$1.Divider, { children: [" ", t(keys.common.or), " "] }), renderLoginOptions] }));
|
|
44416
|
+
};
|
|
44417
|
+
|
|
44271
44418
|
/**
|
|
44272
44419
|
* This component provides the sign-in functionality.
|
|
44273
44420
|
*
|
|
@@ -44278,9 +44425,8 @@ n(css$1,{});
|
|
|
44278
44425
|
* @returns {ReactElement} - React element.
|
|
44279
44426
|
*/
|
|
44280
44427
|
const SignIn = (props) => {
|
|
44281
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
44282
|
-
const { brandingProps, showFooter = true, showLogo = true, showSignUp } = props;
|
|
44283
|
-
const [authResponse, setAuthResponse] = useState();
|
|
44428
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
44429
|
+
const { basicAuthChildren, brandingProps, emailOtpChildren, identifierFirstChildren, showFooter = true, showLogo = true, showSignUp, smsOtpChildren, totpChildren, } = props;
|
|
44284
44430
|
const [isComponentLoading, setIsComponentLoading] = useState(true);
|
|
44285
44431
|
const [alert, setAlert] = useState();
|
|
44286
44432
|
const [showSelfSignUp, setShowSelfSignUp] = useState(showSignUp);
|
|
@@ -44305,7 +44451,7 @@ const SignIn = (props) => {
|
|
|
44305
44451
|
*/
|
|
44306
44452
|
authorize()
|
|
44307
44453
|
.then((response) => {
|
|
44308
|
-
setAuthResponse(response);
|
|
44454
|
+
authContext === null || authContext === void 0 ? void 0 : authContext.setAuthResponse(response);
|
|
44309
44455
|
setIsComponentLoading(false);
|
|
44310
44456
|
})
|
|
44311
44457
|
.catch((error) => {
|
|
@@ -44320,14 +44466,14 @@ const SignIn = (props) => {
|
|
|
44320
44466
|
* @param {object} [authParams] - Authentication parameters.
|
|
44321
44467
|
*/
|
|
44322
44468
|
const handleAuthenticate = (authenticatorId, authParams) => __awaiter$1(void 0, void 0, void 0, function* () {
|
|
44323
|
-
var
|
|
44469
|
+
var _k, _l, _m;
|
|
44324
44470
|
setAlert(undefined);
|
|
44325
|
-
if (authResponse === undefined) {
|
|
44471
|
+
if ((authContext === null || authContext === void 0 ? void 0 : authContext.authResponse) === undefined) {
|
|
44326
44472
|
throw new AsgardeoUIException('REACT_UI-SIGN_IN-HA-IV02', 'Auth response is undefined.');
|
|
44327
44473
|
}
|
|
44328
44474
|
authContext.setIsAuthLoading(true);
|
|
44329
44475
|
const resp = yield authenticate({
|
|
44330
|
-
flowId: authResponse.flowId,
|
|
44476
|
+
flowId: authContext === null || authContext === void 0 ? void 0 : authContext.authResponse.flowId,
|
|
44331
44477
|
selectedAuthenticator: {
|
|
44332
44478
|
authenticatorId,
|
|
44333
44479
|
params: authParams,
|
|
@@ -44338,12 +44484,12 @@ const SignIn = (props) => {
|
|
|
44338
44484
|
throw new AsgardeoUIException('REACT_UI-SIGN_IN-HA-SE03', 'Authentication failed.', authnError.stack);
|
|
44339
44485
|
});
|
|
44340
44486
|
if (!authParams) {
|
|
44341
|
-
const metaData = (
|
|
44487
|
+
const metaData = (_l = (_k = resp.nextStep) === null || _k === void 0 ? void 0 : _k.authenticators[0]) === null || _l === void 0 ? void 0 : _l.metadata;
|
|
44342
44488
|
if (metaData.promptType === PromptType.RedirectionPromt) {
|
|
44343
44489
|
/**
|
|
44344
44490
|
* Open a popup window to handle redirection prompts
|
|
44345
44491
|
*/
|
|
44346
|
-
window.open((
|
|
44492
|
+
window.open((_m = metaData.additionalData) === null || _m === void 0 ? void 0 : _m.redirectUrl, resp.nextStep.authenticators[0].authenticator, 'width=500,height=600');
|
|
44347
44493
|
/**
|
|
44348
44494
|
* Add an event listener to the window to capture the message from the popup
|
|
44349
44495
|
*/
|
|
@@ -44365,25 +44511,25 @@ const SignIn = (props) => {
|
|
|
44365
44511
|
});
|
|
44366
44512
|
}
|
|
44367
44513
|
else if (metaData.promptType === PromptType.UserPrompt) {
|
|
44368
|
-
setAuthResponse(resp);
|
|
44514
|
+
authContext === null || authContext === void 0 ? void 0 : authContext.setAuthResponse(resp);
|
|
44369
44515
|
}
|
|
44370
44516
|
}
|
|
44371
44517
|
else if (resp.flowStatus === FlowStatus.SuccessCompleted && resp.authData) {
|
|
44372
44518
|
/**
|
|
44373
44519
|
* when the authentication is successful, generate the token
|
|
44374
44520
|
*/
|
|
44375
|
-
setAuthResponse(resp);
|
|
44521
|
+
authContext === null || authContext === void 0 ? void 0 : authContext.setAuthResponse(resp);
|
|
44376
44522
|
const authInstance = AuthClient.getInstance();
|
|
44377
44523
|
const state = (yield authInstance.getDataLayer().getTemporaryDataParameter('state')).toString();
|
|
44378
44524
|
yield authInstance.requestAccessToken(resp.authData.code, resp.authData.session_state, state);
|
|
44379
44525
|
authContext.setAuthentication();
|
|
44380
44526
|
}
|
|
44381
44527
|
else if (resp.flowStatus === FlowStatus.FailIncomplete) {
|
|
44382
|
-
setAuthResponse(Object.assign(Object.assign({}, resp), { nextStep: authResponse.nextStep }));
|
|
44528
|
+
authContext === null || authContext === void 0 ? void 0 : authContext.setAuthResponse(Object.assign(Object.assign({}, resp), { nextStep: authContext === null || authContext === void 0 ? void 0 : authContext.authResponse.nextStep }));
|
|
44383
44529
|
setAlert({ alertType: { error: true }, key: keys.common.error });
|
|
44384
44530
|
}
|
|
44385
44531
|
else {
|
|
44386
|
-
setAuthResponse(resp);
|
|
44532
|
+
authContext === null || authContext === void 0 ? void 0 : authContext.setAuthResponse(resp);
|
|
44387
44533
|
setShowSelfSignUp(false);
|
|
44388
44534
|
}
|
|
44389
44535
|
authContext.setIsAuthLoading(false);
|
|
@@ -44397,30 +44543,34 @@ const SignIn = (props) => {
|
|
|
44397
44543
|
return LoginOptions;
|
|
44398
44544
|
};
|
|
44399
44545
|
const renderSignIn = () => {
|
|
44400
|
-
var _a;
|
|
44401
|
-
const authenticators = (_a =
|
|
44546
|
+
var _a, _b;
|
|
44547
|
+
const authenticators = (_b = (_a = authContext === null || authContext === void 0 ? void 0 : authContext.authResponse) === null || _a === void 0 ? void 0 : _a.nextStep) === null || _b === void 0 ? void 0 : _b.authenticators;
|
|
44402
44548
|
if (authenticators) {
|
|
44403
44549
|
const usernamePasswordAuthenticator = authenticators.find((authenticator) => authenticator.authenticator === 'Username & Password');
|
|
44404
44550
|
if (usernamePasswordAuthenticator) {
|
|
44405
|
-
return (jsxRuntimeExports.jsx(BasicAuth, { brandingProps: brandingProps, authenticator: usernamePasswordAuthenticator, handleAuthenticate: handleAuthenticate, showSelfSignUp: showSelfSignUp, alert: alert, renderLoginOptions: renderLoginOptions(authenticators.filter((auth) => auth.authenticatorId !== usernamePasswordAuthenticator.authenticatorId)) }));
|
|
44551
|
+
return (jsxRuntimeExports.jsx(BasicAuth, { brandingProps: brandingProps, authenticator: usernamePasswordAuthenticator, handleAuthenticate: handleAuthenticate, showSelfSignUp: showSelfSignUp, alert: alert, renderLoginOptions: renderLoginOptions(authenticators.filter((auth) => auth.authenticatorId !== usernamePasswordAuthenticator.authenticatorId)), children: basicAuthChildren }));
|
|
44552
|
+
}
|
|
44553
|
+
const identifierFirstAuthenticator = authenticators.find((authenticator) => authenticator.authenticator === 'Identifier First');
|
|
44554
|
+
if (identifierFirstAuthenticator) {
|
|
44555
|
+
return (jsxRuntimeExports.jsx(IdentifierFirst, { brandingProps: brandingProps, authenticator: identifierFirstAuthenticator, handleAuthenticate: handleAuthenticate, showSelfSignUp: showSelfSignUp, alert: alert, renderLoginOptions: renderLoginOptions(authenticators.filter((auth) => auth.authenticatorId !== identifierFirstAuthenticator.authenticatorId)), children: identifierFirstChildren }));
|
|
44406
44556
|
}
|
|
44407
44557
|
if (authenticators.length === 1) {
|
|
44408
44558
|
if (authenticators[0].authenticator === 'TOTP') {
|
|
44409
|
-
return (jsxRuntimeExports.jsx(Totp, { brandingProps: brandingProps, authenticator: authenticators[0], alert: alert, handleAuthenticate: handleAuthenticate }));
|
|
44559
|
+
return (jsxRuntimeExports.jsx(Totp, { brandingProps: brandingProps, authenticator: authenticators[0], alert: alert, handleAuthenticate: handleAuthenticate, children: totpChildren }));
|
|
44410
44560
|
}
|
|
44411
44561
|
if (
|
|
44412
44562
|
// TODO: change after api based auth gets fixed
|
|
44413
44563
|
new SPACryptoUtils()
|
|
44414
|
-
.base64URLDecode(authResponse.nextStep.authenticators[0].authenticatorId)
|
|
44564
|
+
.base64URLDecode(authContext === null || authContext === void 0 ? void 0 : authContext.authResponse.nextStep.authenticators[0].authenticatorId)
|
|
44415
44565
|
.split(':')[0] === 'email-otp-authenticator') {
|
|
44416
|
-
return (jsxRuntimeExports.jsx(EmailOtp, { alert: alert, brandingProps: brandingProps, authenticator: authenticators[0], handleAuthenticate: handleAuthenticate }));
|
|
44566
|
+
return (jsxRuntimeExports.jsx(EmailOtp, { alert: alert, brandingProps: brandingProps, authenticator: authenticators[0], handleAuthenticate: handleAuthenticate, children: emailOtpChildren }));
|
|
44417
44567
|
}
|
|
44418
44568
|
if (
|
|
44419
44569
|
// TODO: change after api based auth gets fixed
|
|
44420
44570
|
new SPACryptoUtils()
|
|
44421
|
-
.base64URLDecode(authResponse.nextStep.authenticators[0].authenticatorId)
|
|
44571
|
+
.base64URLDecode(authContext === null || authContext === void 0 ? void 0 : authContext.authResponse.nextStep.authenticators[0].authenticatorId)
|
|
44422
44572
|
.split(':')[0] === 'sms-otp-authenticator') {
|
|
44423
|
-
return (jsxRuntimeExports.jsx(SmsOtp, { alert: alert, brandingProps: brandingProps, authenticator: authenticators[0], handleAuthenticate: handleAuthenticate }));
|
|
44573
|
+
return (jsxRuntimeExports.jsx(SmsOtp, { alert: alert, brandingProps: brandingProps, authenticator: authenticators[0], handleAuthenticate: handleAuthenticate, children: smsOtpChildren }));
|
|
44424
44574
|
}
|
|
44425
44575
|
}
|
|
44426
44576
|
/**
|
|
@@ -44444,15 +44594,15 @@ const SignIn = (props) => {
|
|
|
44444
44594
|
if (showFooter && copyrightText.includes('{{currentYear}}')) {
|
|
44445
44595
|
copyrightText = copyrightText.replace('{{currentYear}}', new Date().getFullYear().toString());
|
|
44446
44596
|
}
|
|
44447
|
-
return (jsxRuntimeExports.jsx(eo, { theme: generateThemeSignIn(componentBranding === null || componentBranding === void 0 ? void 0 : componentBranding.preference.theme), children: jsxRuntimeExports.jsxs(SignIn$1, { className: "Box-asgardeoSignIn", children: [showLogo && !(isLoading || isComponentLoading) && (jsxRuntimeExports.jsx(SignIn$1.Image, { className: "asgardeo-sign-in-logo", src: imgUrl })), (
|
|
44597
|
+
return (jsxRuntimeExports.jsx(eo, { theme: generateThemeSignIn(componentBranding === null || componentBranding === void 0 ? void 0 : componentBranding.preference.theme), children: jsxRuntimeExports.jsxs(SignIn$1, { className: "Box-asgardeoSignIn", children: [showLogo && !(isLoading || isComponentLoading) && (jsxRuntimeExports.jsx(SignIn$1.Image, { className: "asgardeo-sign-in-logo", src: imgUrl })), ((_g = authContext === null || authContext === void 0 ? void 0 : authContext.authResponse) === null || _g === void 0 ? void 0 : _g.flowStatus) !== FlowStatus.SuccessCompleted && !isAuthenticated && (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [renderSignIn(), showFooter && !(isLoading || isComponentLoading) && (jsxRuntimeExports.jsx(SignIn$1.Footer, { className: "asgardeo-sign-in-footer", copyrights: { children: copyrightText }, items: [
|
|
44448
44598
|
{
|
|
44449
44599
|
children: (jsxRuntimeExports.jsx(SignIn$1.Link, { href: componentBranding.preference.urls.privacyPolicyURL, children: t(keys.common.privacy.policy) })),
|
|
44450
44600
|
},
|
|
44451
44601
|
{
|
|
44452
44602
|
children: (jsxRuntimeExports.jsx(SignIn$1.Link, { href: componentBranding.preference.urls.termsOfUseURL, children: t(keys.common.terms.of.service) })),
|
|
44453
44603
|
},
|
|
44454
|
-
{ children: jsxRuntimeExports.jsx(SignIn$1.Typography, { children: (
|
|
44455
|
-
] }))] })), ((
|
|
44604
|
+
{ children: jsxRuntimeExports.jsx(SignIn$1.Typography, { children: (_h = componentBranding === null || componentBranding === void 0 ? void 0 : componentBranding.locale) !== null && _h !== void 0 ? _h : DEFAULT_LOCALE }) },
|
|
44605
|
+
] }))] })), (((_j = authContext === null || authContext === void 0 ? void 0 : authContext.authResponse) === null || _j === void 0 ? void 0 : _j.flowStatus) === FlowStatus.SuccessCompleted || isAuthenticated) && (jsxRuntimeExports.jsx("div", { style: { backgroundColor: 'white', padding: '1rem' }, children: "Successfully Authenticated" }))] }) }));
|
|
44456
44606
|
};
|
|
44457
44607
|
|
|
44458
44608
|
/**
|
|
@@ -44863,6 +45013,8 @@ const AsgardeoProvider = (props) => {
|
|
|
44863
45013
|
const [isBrandingLoading, setIsBrandingLoading] = useState(true);
|
|
44864
45014
|
const [isTextLoading, setIsTextLoading] = useState(true);
|
|
44865
45015
|
const [isAuthLoading, setIsAuthLoading] = useState(false);
|
|
45016
|
+
const [authResponse, setAuthResponse] = useState();
|
|
45017
|
+
const [username, setUsername] = useState('');
|
|
44866
45018
|
const onSignInRef = useRef();
|
|
44867
45019
|
const onSignOutRef = useRef();
|
|
44868
45020
|
const setOnSignIn = useCallback((newOnSignIn) => {
|
|
@@ -44913,6 +45065,7 @@ const AsgardeoProvider = (props) => {
|
|
|
44913
45065
|
}, [config.signInRedirectURL, setAuthentication]);
|
|
44914
45066
|
const value = useMemo(() => ({
|
|
44915
45067
|
accessToken,
|
|
45068
|
+
authResponse,
|
|
44916
45069
|
config,
|
|
44917
45070
|
isAuthLoading,
|
|
44918
45071
|
isAuthenticated,
|
|
@@ -44920,24 +45073,31 @@ const AsgardeoProvider = (props) => {
|
|
|
44920
45073
|
isGlobalLoading: isBrandingLoading || isTextLoading || isAuthLoading,
|
|
44921
45074
|
isTextLoading,
|
|
44922
45075
|
onSignOutRef,
|
|
45076
|
+
setAuthResponse,
|
|
44923
45077
|
setAuthentication,
|
|
44924
45078
|
setIsAuthLoading,
|
|
44925
45079
|
setIsBrandingLoading,
|
|
44926
45080
|
setIsTextLoading,
|
|
44927
45081
|
setOnSignIn,
|
|
44928
45082
|
setOnSignOut,
|
|
45083
|
+
setUsername,
|
|
44929
45084
|
user,
|
|
45085
|
+
username,
|
|
44930
45086
|
}), [
|
|
44931
45087
|
accessToken,
|
|
45088
|
+
authResponse,
|
|
44932
45089
|
config,
|
|
44933
45090
|
isAuthLoading,
|
|
44934
45091
|
isAuthenticated,
|
|
44935
45092
|
isBrandingLoading,
|
|
44936
45093
|
isTextLoading,
|
|
45094
|
+
setAuthResponse,
|
|
44937
45095
|
setAuthentication,
|
|
44938
45096
|
setOnSignIn,
|
|
44939
45097
|
setOnSignOut,
|
|
45098
|
+
setUsername,
|
|
44940
45099
|
user,
|
|
45100
|
+
username,
|
|
44941
45101
|
]);
|
|
44942
45102
|
return (jsxRuntimeExports.jsx(AsgardeoContext.Provider, { value: value, children: jsxRuntimeExports.jsx(BrandingPreferenceProvider, { branding: branding, children: jsxRuntimeExports.jsx(I18nProvider, { providerLocaleOverride: branding === null || branding === void 0 ? void 0 : branding.locale, providerTextOverrides: (_a = branding === null || branding === void 0 ? void 0 : branding.preference) === null || _a === void 0 ? void 0 : _a.text, children: children }) }) }));
|
|
44943
45103
|
};
|