@thunderid/javascript 0.11.2 → 0.12.0
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/DefaultCacheStore.d.ts +0 -17
- package/dist/DefaultCacheStore.d.ts.map +1 -1
- package/dist/DefaultCrypto.d.ts +0 -17
- package/dist/DefaultCrypto.d.ts.map +1 -1
- package/dist/HttpClient.d.ts +0 -17
- package/dist/HttpClient.d.ts.map +1 -1
- package/dist/IsomorphicCrypto.d.ts +0 -17
- package/dist/IsomorphicCrypto.d.ts.map +1 -1
- package/dist/StorageManager.d.ts +0 -17
- package/dist/StorageManager.d.ts.map +1 -1
- package/dist/ThunderIDJavaScriptClient.d.ts +0 -17
- package/dist/ThunderIDJavaScriptClient.d.ts.map +1 -1
- package/dist/api/executeEmbeddedRecoveryFlow.d.ts +0 -17
- package/dist/api/executeEmbeddedRecoveryFlow.d.ts.map +1 -1
- package/dist/api/executeEmbeddedSignInFlow.d.ts +0 -17
- package/dist/api/executeEmbeddedSignInFlow.d.ts.map +1 -1
- package/dist/api/executeEmbeddedSignUpFlow.d.ts +0 -17
- package/dist/api/executeEmbeddedSignUpFlow.d.ts.map +1 -1
- package/dist/api/executeEmbeddedUserOnboardingFlow.d.ts +0 -17
- package/dist/api/executeEmbeddedUserOnboardingFlow.d.ts.map +1 -1
- package/dist/api/getFlowMeta.d.ts +0 -17
- package/dist/api/getFlowMeta.d.ts.map +1 -1
- package/dist/api/getOrganizationUnitChildren.d.ts +0 -17
- package/dist/api/getOrganizationUnitChildren.d.ts.map +1 -1
- package/dist/api/getUserInfo.d.ts +0 -17
- package/dist/api/getUserInfo.d.ts.map +1 -1
- package/dist/api/getUsersMe.d.ts +0 -17
- package/dist/api/getUsersMe.d.ts.map +1 -1
- package/dist/api/updateMeProfile.d.ts +0 -17
- package/dist/api/updateMeProfile.d.ts.map +1 -1
- package/dist/cjs/index.cjs +808 -1280
- package/dist/constants/ApplicationNativeAuthenticationConstants.d.ts +0 -17
- package/dist/constants/ApplicationNativeAuthenticationConstants.d.ts.map +1 -1
- package/dist/constants/ConsentConstants.d.ts +22 -0
- package/dist/constants/ConsentConstants.d.ts.map +1 -0
- package/dist/constants/OIDCDiscoveryConstants.d.ts +0 -17
- package/dist/constants/OIDCDiscoveryConstants.d.ts.map +1 -1
- package/dist/constants/OIDCRequestConstants.d.ts +0 -17
- package/dist/constants/OIDCRequestConstants.d.ts.map +1 -1
- package/dist/constants/PKCEConstants.d.ts +0 -17
- package/dist/constants/PKCEConstants.d.ts.map +1 -1
- package/dist/constants/ScopeConstants.d.ts +0 -17
- package/dist/constants/ScopeConstants.d.ts.map +1 -1
- package/dist/constants/TokenConstants.d.ts +0 -17
- package/dist/constants/TokenConstants.d.ts.map +1 -1
- package/dist/constants/TokenExchangeConstants.d.ts +0 -17
- package/dist/constants/TokenExchangeConstants.d.ts.map +1 -1
- package/dist/constants/VendorConstants.d.ts +0 -17
- package/dist/constants/VendorConstants.d.ts.map +1 -1
- package/dist/edge/index.js +808 -1281
- package/dist/errors/ThunderIDAPIError.d.ts +0 -17
- package/dist/errors/ThunderIDAPIError.d.ts.map +1 -1
- package/dist/errors/ThunderIDError.d.ts +0 -17
- package/dist/errors/ThunderIDError.d.ts.map +1 -1
- package/dist/errors/ThunderIDRuntimeError.d.ts +0 -17
- package/dist/errors/ThunderIDRuntimeError.d.ts.map +1 -1
- package/dist/errors/exception.d.ts +0 -17
- package/dist/errors/exception.d.ts.map +1 -1
- package/dist/i18n/constants/TranslationBundleConstants.d.ts +0 -17
- package/dist/i18n/constants/TranslationBundleConstants.d.ts.map +1 -1
- package/dist/i18n/models/i18n.d.ts +0 -17
- package/dist/i18n/models/i18n.d.ts.map +1 -1
- package/dist/i18n/translations/en-US.d.ts +0 -17
- package/dist/i18n/translations/en-US.d.ts.map +1 -1
- package/dist/i18n/translations/fr-FR.d.ts +0 -17
- package/dist/i18n/translations/fr-FR.d.ts.map +1 -1
- package/dist/i18n/translations/hi-IN.d.ts +0 -17
- package/dist/i18n/translations/hi-IN.d.ts.map +1 -1
- package/dist/i18n/translations/index.d.ts +0 -17
- package/dist/i18n/translations/index.d.ts.map +1 -1
- package/dist/i18n/translations/ja-JP.d.ts +0 -17
- package/dist/i18n/translations/ja-JP.d.ts.map +1 -1
- package/dist/i18n/translations/pt-BR.d.ts +0 -17
- package/dist/i18n/translations/pt-BR.d.ts.map +1 -1
- package/dist/i18n/translations/pt-PT.d.ts +0 -17
- package/dist/i18n/translations/pt-PT.d.ts.map +1 -1
- package/dist/i18n/translations/si-LK.d.ts +0 -17
- package/dist/i18n/translations/si-LK.d.ts.map +1 -1
- package/dist/i18n/translations/ta-IN.d.ts +0 -17
- package/dist/i18n/translations/ta-IN.d.ts.map +1 -1
- package/dist/i18n/translations/te-IN.d.ts +0 -17
- package/dist/i18n/translations/te-IN.d.ts.map +1 -1
- package/dist/i18n/utils/getDefaultI18nBundles.d.ts +0 -17
- package/dist/i18n/utils/getDefaultI18nBundles.d.ts.map +1 -1
- package/dist/i18n/utils/normalizeTranslations.d.ts +0 -17
- package/dist/i18n/utils/normalizeTranslations.d.ts.map +1 -1
- package/dist/index.d.ts +1 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +808 -1281
- package/dist/models/agent.d.ts +0 -17
- package/dist/models/agent.d.ts.map +1 -1
- package/dist/models/auth-code-response.d.ts +0 -17
- package/dist/models/auth-code-response.d.ts.map +1 -1
- package/dist/models/ciba.d.ts +0 -17
- package/dist/models/ciba.d.ts.map +1 -1
- package/dist/models/client.d.ts +0 -17
- package/dist/models/client.d.ts.map +1 -1
- package/dist/models/config.d.ts +0 -17
- package/dist/models/config.d.ts.map +1 -1
- package/dist/models/crypto.d.ts +0 -17
- package/dist/models/crypto.d.ts.map +1 -1
- package/dist/models/embedded-flow.d.ts +8 -17
- package/dist/models/embedded-flow.d.ts.map +1 -1
- package/dist/models/embedded-recovery-flow.d.ts +0 -17
- package/dist/models/embedded-recovery-flow.d.ts.map +1 -1
- package/dist/models/embedded-signin-flow.d.ts +5 -17
- package/dist/models/embedded-signin-flow.d.ts.map +1 -1
- package/dist/models/embedded-signup-flow.d.ts +0 -17
- package/dist/models/embedded-signup-flow.d.ts.map +1 -1
- package/dist/models/extensions/components.d.ts +0 -17
- package/dist/models/extensions/components.d.ts.map +1 -1
- package/dist/models/field.d.ts +0 -17
- package/dist/models/field.d.ts.map +1 -1
- package/dist/models/flow-meta.d.ts +0 -17
- package/dist/models/flow-meta.d.ts.map +1 -1
- package/dist/models/flow.d.ts +1 -19
- package/dist/models/flow.d.ts.map +1 -1
- package/dist/models/http.d.ts +0 -17
- package/dist/models/http.d.ts.map +1 -1
- package/dist/models/oauth-request.d.ts +0 -17
- package/dist/models/oauth-request.d.ts.map +1 -1
- package/dist/models/oauth-response.d.ts +0 -17
- package/dist/models/oauth-response.d.ts.map +1 -1
- package/dist/models/oidc-discovery.d.ts +0 -17
- package/dist/models/oidc-discovery.d.ts.map +1 -1
- package/dist/models/oidc-endpoints.d.ts +0 -17
- package/dist/models/oidc-endpoints.d.ts.map +1 -1
- package/dist/models/session.d.ts +0 -17
- package/dist/models/session.d.ts.map +1 -1
- package/dist/models/store.d.ts +0 -17
- package/dist/models/store.d.ts.map +1 -1
- package/dist/models/token-endpoint-auth.d.ts +0 -17
- package/dist/models/token-endpoint-auth.d.ts.map +1 -1
- package/dist/models/token.d.ts +0 -17
- package/dist/models/token.d.ts.map +1 -1
- package/dist/models/translation.d.ts +0 -17
- package/dist/models/translation.d.ts.map +1 -1
- package/dist/models/user.d.ts +0 -17
- package/dist/models/user.d.ts.map +1 -1
- package/dist/models/utility-types.d.ts +0 -17
- package/dist/models/utility-types.d.ts.map +1 -1
- package/dist/models/vars.d.ts +0 -17
- package/dist/models/vars.d.ts.map +1 -1
- package/dist/theme/createTheme.d.ts +0 -17
- package/dist/theme/createTheme.d.ts.map +1 -1
- package/dist/theme/types.d.ts +0 -17
- package/dist/theme/types.d.ts.map +1 -1
- package/dist/utils/AuthenticationHelper.d.ts +0 -17
- package/dist/utils/AuthenticationHelper.d.ts.map +1 -1
- package/dist/utils/arrayBufferToBase64url.d.ts +0 -17
- package/dist/utils/arrayBufferToBase64url.d.ts.map +1 -1
- package/dist/utils/base64Encode.d.ts +0 -17
- package/dist/utils/base64Encode.d.ts.map +1 -1
- package/dist/utils/base64urlToArrayBuffer.d.ts +0 -17
- package/dist/utils/base64urlToArrayBuffer.d.ts.map +1 -1
- package/dist/utils/bem.d.ts +0 -17
- package/dist/utils/bem.d.ts.map +1 -1
- package/dist/utils/buildValidatorFromRules.d.ts +0 -17
- package/dist/utils/buildValidatorFromRules.d.ts.map +1 -1
- package/dist/utils/containsMetaFlowTemplateLiteral.d.ts +0 -17
- package/dist/utils/containsMetaFlowTemplateLiteral.d.ts.map +1 -1
- package/dist/utils/countryCodeToFlagEmoji.d.ts +0 -17
- package/dist/utils/countryCodeToFlagEmoji.d.ts.map +1 -1
- package/dist/utils/deepMerge.d.ts +0 -17
- package/dist/utils/deepMerge.d.ts.map +1 -1
- package/dist/utils/evaluateValidationRule.d.ts +0 -17
- package/dist/utils/evaluateValidationRule.d.ts.map +1 -1
- package/dist/utils/extractEmojiFromUri.d.ts +0 -17
- package/dist/utils/extractEmojiFromUri.d.ts.map +1 -1
- package/dist/utils/extractPkceStorageKeyFromState.d.ts +0 -17
- package/dist/utils/extractPkceStorageKeyFromState.d.ts.map +1 -1
- package/dist/utils/extractTenantDomainFromIdTokenPayload.d.ts +0 -17
- package/dist/utils/extractTenantDomainFromIdTokenPayload.d.ts.map +1 -1
- package/dist/utils/extractUserClaimsFromIdToken.d.ts +0 -17
- package/dist/utils/extractUserClaimsFromIdToken.d.ts.map +1 -1
- package/dist/utils/formatDate.d.ts +0 -17
- package/dist/utils/formatDate.d.ts.map +1 -1
- package/dist/utils/generatePkceStorageKey.d.ts +0 -17
- package/dist/utils/generatePkceStorageKey.d.ts.map +1 -1
- package/dist/utils/generateStateParamForRequestCorrelation.d.ts +0 -17
- package/dist/utils/generateStateParamForRequestCorrelation.d.ts.map +1 -1
- package/dist/utils/get.d.ts +0 -17
- package/dist/utils/get.d.ts.map +1 -1
- package/dist/utils/getAuthorizeRequestUrlParams.d.ts +0 -17
- package/dist/utils/getAuthorizeRequestUrlParams.d.ts.map +1 -1
- package/dist/utils/getLatestStateParam.d.ts +0 -17
- package/dist/utils/getLatestStateParam.d.ts.map +1 -1
- package/dist/utils/getRedirectBasedSignUpUrl.d.ts +0 -17
- package/dist/utils/getRedirectBasedSignUpUrl.d.ts.map +1 -1
- package/dist/utils/getVendorPrefix.d.ts +0 -17
- package/dist/utils/getVendorPrefix.d.ts.map +1 -1
- package/dist/utils/injectRequestedPermissions.d.ts +0 -17
- package/dist/utils/injectRequestedPermissions.d.ts.map +1 -1
- package/dist/utils/isEmojiUri.d.ts +0 -17
- package/dist/utils/isEmojiUri.d.ts.map +1 -1
- package/dist/utils/isEmpty.d.ts +0 -17
- package/dist/utils/isEmpty.d.ts.map +1 -1
- package/dist/utils/isMetaFlowTemplateLiteral.d.ts +0 -17
- package/dist/utils/isMetaFlowTemplateLiteral.d.ts.map +1 -1
- package/dist/utils/isRecognizedBaseUrlPattern.d.ts +0 -17
- package/dist/utils/isRecognizedBaseUrlPattern.d.ts.map +1 -1
- package/dist/utils/isTranslationFlowTemplateLiteral.d.ts +0 -17
- package/dist/utils/isTranslationFlowTemplateLiteral.d.ts.map +1 -1
- package/dist/utils/logger.d.ts +0 -17
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/parseApiErrorMessage.d.ts +0 -17
- package/dist/utils/parseApiErrorMessage.d.ts.map +1 -1
- package/dist/utils/parseFlowTemplateLiteral.d.ts +0 -17
- package/dist/utils/parseFlowTemplateLiteral.d.ts.map +1 -1
- package/dist/utils/processOpenIDScopes.d.ts +0 -17
- package/dist/utils/processOpenIDScopes.d.ts.map +1 -1
- package/dist/utils/processUsername.d.ts +0 -17
- package/dist/utils/processUsername.d.ts.map +1 -1
- package/dist/utils/removeTrailingSlash.d.ts +0 -17
- package/dist/utils/removeTrailingSlash.d.ts.map +1 -1
- package/dist/utils/resolveFieldName.d.ts +0 -17
- package/dist/utils/resolveFieldName.d.ts.map +1 -1
- package/dist/utils/resolveFlowTemplateLiterals.d.ts +0 -17
- package/dist/utils/resolveFlowTemplateLiterals.d.ts.map +1 -1
- package/dist/utils/resolveLocaleDisplayName.d.ts +0 -17
- package/dist/utils/resolveLocaleDisplayName.d.ts.map +1 -1
- package/dist/utils/resolveLocaleEmoji.d.ts +0 -17
- package/dist/utils/resolveLocaleEmoji.d.ts.map +1 -1
- package/dist/utils/resolveMeta.d.ts +0 -17
- package/dist/utils/resolveMeta.d.ts.map +1 -1
- package/dist/utils/resolveResourceEndpoint.d.ts +0 -17
- package/dist/utils/resolveResourceEndpoint.d.ts.map +1 -1
- package/dist/utils/set.d.ts +0 -17
- package/dist/utils/set.d.ts.map +1 -1
- package/dist/utils/startCase.d.ts +0 -17
- package/dist/utils/startCase.d.ts.map +1 -1
- package/dist/utils/withVendorCSSClassPrefix.d.ts +1 -18
- package/dist/utils/withVendorCSSClassPrefix.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -14,23 +14,6 @@ var __export = (all) => {
|
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/constants/TokenConstants.ts
|
|
16
16
|
/**
|
|
17
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
18
|
-
*
|
|
19
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
20
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
21
|
-
* in compliance with the License.
|
|
22
|
-
* You may obtain a copy of the License at
|
|
23
|
-
*
|
|
24
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
-
*
|
|
26
|
-
* Unless required by applicable law or agreed to in writing,
|
|
27
|
-
* software distributed under the License is distributed on an
|
|
28
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
29
|
-
* KIND, either express or implied. See the License for the
|
|
30
|
-
* specific language governing permissions and limitations
|
|
31
|
-
* under the License.
|
|
32
|
-
*/
|
|
33
|
-
/**
|
|
34
17
|
* Constants related to OIDC token management and storage.
|
|
35
18
|
* This object contains configuration values and storage keys
|
|
36
19
|
* used in token validation and management processes.
|
|
@@ -67,23 +50,6 @@ var TokenConstants_default = TokenConstants;
|
|
|
67
50
|
//#endregion
|
|
68
51
|
//#region src/errors/exception.ts
|
|
69
52
|
/**
|
|
70
|
-
* Copyright (c) 2020, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
|
|
71
|
-
*
|
|
72
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
73
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
74
|
-
* in compliance with the License.
|
|
75
|
-
* You may obtain a copy of the License at
|
|
76
|
-
*
|
|
77
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
78
|
-
*
|
|
79
|
-
* Unless required by applicable law or agreed to in writing,
|
|
80
|
-
* software distributed under the License is distributed on an
|
|
81
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
82
|
-
* KIND, either express or implied. See the License for the
|
|
83
|
-
* specific language governing permissions and limitations
|
|
84
|
-
* under the License.
|
|
85
|
-
*/
|
|
86
|
-
/**
|
|
87
53
|
* @deprecated Use `ThunderIDRuntimeError` for runtime errors and `ThunderIDAPIError` for API errors.
|
|
88
54
|
*/
|
|
89
55
|
var ThunderIDAuthException = class extends Error {
|
|
@@ -171,23 +137,6 @@ var IsomorphicCrypto = class {
|
|
|
171
137
|
//#endregion
|
|
172
138
|
//#region src/errors/ThunderIDError.ts
|
|
173
139
|
/**
|
|
174
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
175
|
-
*
|
|
176
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
177
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
178
|
-
* in compliance with the License.
|
|
179
|
-
* You may obtain a copy of the License at
|
|
180
|
-
*
|
|
181
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
182
|
-
*
|
|
183
|
-
* Unless required by applicable law or agreed to in writing,
|
|
184
|
-
* software distributed under the License is distributed on an
|
|
185
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
186
|
-
* KIND, either express or implied. See the License for the
|
|
187
|
-
* specific language governing permissions and limitations
|
|
188
|
-
* under the License.
|
|
189
|
-
*/
|
|
190
|
-
/**
|
|
191
140
|
* Base class for all ThunderID errors. This class extends the native Error class
|
|
192
141
|
* and adds support for error codes and proper stack traces. Each error is prefixed
|
|
193
142
|
* with a lightning emoji and the SDK name for easy identification.
|
|
@@ -236,23 +185,6 @@ var ThunderIDError = class ThunderIDError extends Error {
|
|
|
236
185
|
//#endregion
|
|
237
186
|
//#region src/utils/parseApiErrorMessage.ts
|
|
238
187
|
/**
|
|
239
|
-
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
|
|
240
|
-
*
|
|
241
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
242
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
243
|
-
* in compliance with the License.
|
|
244
|
-
* You may obtain a copy of the License at
|
|
245
|
-
*
|
|
246
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
247
|
-
*
|
|
248
|
-
* Unless required by applicable law or agreed to in writing,
|
|
249
|
-
* software distributed under the License is distributed on an
|
|
250
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
251
|
-
* KIND, either express or implied. See the License for the
|
|
252
|
-
* specific language governing permissions and limitations
|
|
253
|
-
* under the License.
|
|
254
|
-
*/
|
|
255
|
-
/**
|
|
256
188
|
* Attempts to extract a human-readable message from a structured API error response body.
|
|
257
189
|
*
|
|
258
190
|
* The backend returns errors in the following form:
|
|
@@ -415,23 +347,6 @@ let EmbeddedSignInFlowType = /* @__PURE__ */ function(EmbeddedSignInFlowType$1)
|
|
|
415
347
|
//#endregion
|
|
416
348
|
//#region src/utils/injectRequestedPermissions.ts
|
|
417
349
|
/**
|
|
418
|
-
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
|
|
419
|
-
*
|
|
420
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
421
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
422
|
-
* in compliance with the License.
|
|
423
|
-
* You may obtain a copy of the License at
|
|
424
|
-
*
|
|
425
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
426
|
-
*
|
|
427
|
-
* Unless required by applicable law or agreed to in writing,
|
|
428
|
-
* software distributed under the License is distributed on an
|
|
429
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
430
|
-
* KIND, either express or implied. See the License for the
|
|
431
|
-
* specific language governing permissions and limitations
|
|
432
|
-
* under the License.
|
|
433
|
-
*/
|
|
434
|
-
/**
|
|
435
350
|
* Strips the top-level `scopes` field from a payload and injects it as
|
|
436
351
|
* `inputs.requested_permissions` (space-separated string).
|
|
437
352
|
*
|
|
@@ -453,175 +368,512 @@ const injectRequestedPermissions = (payload) => {
|
|
|
453
368
|
var injectRequestedPermissions_default = injectRequestedPermissions;
|
|
454
369
|
|
|
455
370
|
//#endregion
|
|
456
|
-
//#region src/
|
|
457
|
-
const
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
verbose: true
|
|
467
|
-
} : basePayload;
|
|
468
|
-
const response = await fetch(endpoint, {
|
|
469
|
-
...requestConfig,
|
|
470
|
-
body: JSON.stringify(requestPayload),
|
|
471
|
-
headers: {
|
|
472
|
-
Accept: "application/json",
|
|
473
|
-
"Content-Type": "application/json",
|
|
474
|
-
...isNewFlowStart && flowSecret ? { "Flow-Secret": flowSecret } : {},
|
|
475
|
-
...requestConfig.headers
|
|
476
|
-
},
|
|
477
|
-
method: requestConfig.method || "POST"
|
|
478
|
-
});
|
|
479
|
-
if (!response.ok) throw new ThunderIDAPIError(await response.text(), "executeEmbeddedSignInFlow-ResponseError-001", "javascript", response.status, response.statusText, "Authorization request failed");
|
|
480
|
-
const flowResponse = await response.json();
|
|
481
|
-
if (flowResponse.flowStatus === EmbeddedSignInFlowStatus.Complete && flowResponse.assertion && authId) try {
|
|
482
|
-
const oauth2Response = await fetch(`${baseUrl}/oauth2/auth/callback`, {
|
|
483
|
-
body: JSON.stringify({
|
|
484
|
-
assertion: flowResponse.assertion,
|
|
485
|
-
authId
|
|
486
|
-
}),
|
|
487
|
-
credentials: "include",
|
|
488
|
-
headers: {
|
|
489
|
-
Accept: "application/json",
|
|
490
|
-
"Content-Type": "application/json",
|
|
491
|
-
...requestConfig.headers
|
|
492
|
-
},
|
|
493
|
-
method: "POST"
|
|
494
|
-
});
|
|
495
|
-
if (!oauth2Response.ok) throw new ThunderIDAPIError(await oauth2Response.text(), "executeEmbeddedSignInFlow-OAuth2Error-002", "javascript", oauth2Response.status, oauth2Response.statusText, "OAuth2 authorization failed");
|
|
496
|
-
const oauth2Result = await oauth2Response.json();
|
|
497
|
-
return {
|
|
498
|
-
flowStatus: flowResponse.flowStatus,
|
|
499
|
-
redirectUrl: oauth2Result["redirect_uri"]
|
|
500
|
-
};
|
|
501
|
-
} catch (authError) {
|
|
502
|
-
if (authError instanceof ThunderIDAPIError) throw authError;
|
|
503
|
-
throw new ThunderIDAPIError(authError instanceof Error ? authError.message : "Unknown error", "executeEmbeddedSignInFlow-OAuth2Error-001", "javascript", 500, "Failed to complete OAuth2 authorization after successful embedded sign-in flow.", "OAuth2 authorization failed");
|
|
504
|
-
}
|
|
505
|
-
return flowResponse;
|
|
371
|
+
//#region src/utils/logger.ts
|
|
372
|
+
const PREFIX = "⚡ ThunderID";
|
|
373
|
+
/**
|
|
374
|
+
* Default logger configuration
|
|
375
|
+
*/
|
|
376
|
+
const DEFAULT_CONFIG$1 = {
|
|
377
|
+
level: "info",
|
|
378
|
+
prefix: `${PREFIX}`,
|
|
379
|
+
showLevel: true,
|
|
380
|
+
timestamps: true
|
|
506
381
|
};
|
|
507
|
-
var executeEmbeddedSignInFlow_default = executeEmbeddedSignInFlow;
|
|
508
|
-
|
|
509
|
-
//#endregion
|
|
510
|
-
//#region src/models/embedded-signup-flow.ts
|
|
511
382
|
/**
|
|
512
|
-
*
|
|
513
|
-
*
|
|
514
|
-
* These statuses indicate the current state of the registration flow and determine
|
|
515
|
-
* the next action required by the client application. Each status provides specific
|
|
516
|
-
* guidance on how to proceed with the user registration process.
|
|
517
|
-
*
|
|
518
|
-
* @example
|
|
519
|
-
* ```typescript
|
|
520
|
-
* switch (response.flowStatus) {
|
|
521
|
-
* case EmbeddedSignUpFlowStatus.Incomplete:
|
|
522
|
-
* // More user input needed - render registration form components
|
|
523
|
-
* break;
|
|
524
|
-
* case EmbeddedSignUpFlowStatus.Complete:
|
|
525
|
-
* // Registration successful - handle completion
|
|
526
|
-
* break;
|
|
527
|
-
* case EmbeddedSignUpFlowStatus.Error:
|
|
528
|
-
* // Registration failed - show error details
|
|
529
|
-
* const errorResponse = response as EmbeddedSignUpFlowErrorResponse;
|
|
530
|
-
* showError(errorResponse.error.description.defaultValue);
|
|
531
|
-
* break;
|
|
532
|
-
* }
|
|
533
|
-
* ```
|
|
534
|
-
*
|
|
535
|
-
* @experimental Part of the new ThunderID API
|
|
383
|
+
* Environment detection utilities
|
|
536
384
|
*/
|
|
537
|
-
|
|
385
|
+
const isBrowser = () => typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
386
|
+
const isNode = () => typeof process !== "undefined" && process.versions && process.versions.node;
|
|
387
|
+
/**
|
|
388
|
+
* Color codes for terminal output (Node.js)
|
|
389
|
+
*/
|
|
390
|
+
const COLORS = {
|
|
391
|
+
blue: "\x1B[34m",
|
|
392
|
+
bright: "\x1B[1m",
|
|
393
|
+
cyan: "\x1B[36m",
|
|
394
|
+
dim: "\x1B[2m",
|
|
395
|
+
gray: "\x1B[90m",
|
|
396
|
+
green: "\x1B[32m",
|
|
397
|
+
magenta: "\x1B[35m",
|
|
398
|
+
red: "\x1B[31m",
|
|
399
|
+
reset: "\x1B[0m",
|
|
400
|
+
white: "\x1B[37m",
|
|
401
|
+
yellow: "\x1B[33m"
|
|
402
|
+
};
|
|
403
|
+
/**
|
|
404
|
+
* Browser console styling
|
|
405
|
+
*/
|
|
406
|
+
const BROWSER_STYLES = {
|
|
407
|
+
debug: "color: #6b7280; font-weight: normal;",
|
|
408
|
+
error: "color: #dc2626; font-weight: bold;",
|
|
409
|
+
info: "color: #2563eb; font-weight: bold;",
|
|
410
|
+
prefix: "color: #7c3aed; font-weight: bold;",
|
|
411
|
+
timestamp: "color: #6b7280; font-size: 0.9em;",
|
|
412
|
+
warn: "color: #d97706; font-weight: bold;"
|
|
413
|
+
};
|
|
414
|
+
const LOG_LEVEL_ORDER = {
|
|
415
|
+
debug: 0,
|
|
416
|
+
error: 3,
|
|
417
|
+
info: 1,
|
|
418
|
+
warn: 2
|
|
419
|
+
};
|
|
420
|
+
/**
|
|
421
|
+
* Universal logger class that works in both browser and Node.js environments
|
|
422
|
+
*/
|
|
423
|
+
var Logger = class Logger {
|
|
424
|
+
config;
|
|
425
|
+
constructor(config = {}) {
|
|
426
|
+
this.config = {
|
|
427
|
+
...DEFAULT_CONFIG$1,
|
|
428
|
+
...config
|
|
429
|
+
};
|
|
430
|
+
}
|
|
538
431
|
/**
|
|
539
|
-
*
|
|
540
|
-
*
|
|
541
|
-
* The user has successfully registered and the flow can proceed to
|
|
542
|
-
* OAuth2 completion or redirection. Check for redirectUrl or assertion
|
|
543
|
-
* data in the response for next steps.
|
|
432
|
+
* Update logger configuration
|
|
544
433
|
*/
|
|
545
|
-
|
|
434
|
+
configure(config) {
|
|
435
|
+
this.config = {
|
|
436
|
+
...this.config,
|
|
437
|
+
...config
|
|
438
|
+
};
|
|
439
|
+
}
|
|
546
440
|
/**
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
* Registration failed due to validation errors, duplicate user,
|
|
550
|
-
* system errors, or other issues. The response will be of type
|
|
551
|
-
* `EmbeddedSignUpFlowErrorResponse` containing detailed failure
|
|
552
|
-
* information that can be displayed to the user.
|
|
553
|
-
*
|
|
554
|
-
* @see {@link EmbeddedSignUpFlowErrorResponse} for error response structure
|
|
441
|
+
* Get current configuration
|
|
555
442
|
*/
|
|
556
|
-
|
|
443
|
+
getConfig() {
|
|
444
|
+
return { ...this.config };
|
|
445
|
+
}
|
|
557
446
|
/**
|
|
558
|
-
*
|
|
559
|
-
*
|
|
560
|
-
* More registration steps are needed. The response will contain
|
|
561
|
-
* components in data.meta.components that should be rendered to
|
|
562
|
-
* collect additional user information (e.g., profile data, verification).
|
|
447
|
+
* Check if a log level should be output
|
|
563
448
|
*/
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
}
|
|
567
|
-
/**
|
|
568
|
-
* Type enumeration for ThunderID embedded sign-up flow responses.
|
|
569
|
-
*
|
|
570
|
-
* Determines the nature of the registration flow response and how the client
|
|
571
|
-
* should handle the returned data. This affects both UI rendering and flow
|
|
572
|
-
* continuation logic during the user registration process.
|
|
573
|
-
*
|
|
574
|
-
* @experimental Part of the new ThunderID API
|
|
575
|
-
*/
|
|
576
|
-
let EmbeddedSignUpFlowType = /* @__PURE__ */ function(EmbeddedSignUpFlowType$1) {
|
|
449
|
+
shouldLog(level) {
|
|
450
|
+
return LOG_LEVEL_ORDER[level] >= LOG_LEVEL_ORDER[this.config.level];
|
|
451
|
+
}
|
|
577
452
|
/**
|
|
578
|
-
*
|
|
579
|
-
*
|
|
580
|
-
* Used for social registration providers, external identity providers,
|
|
581
|
-
* or other flows that require navigating to an external URL during
|
|
582
|
-
* the registration process. The response will contain redirection information.
|
|
453
|
+
* Get timestamp string
|
|
583
454
|
*/
|
|
584
|
-
|
|
455
|
+
static getTimestamp() {
|
|
456
|
+
return (/* @__PURE__ */ new Date()).toISOString();
|
|
457
|
+
}
|
|
585
458
|
/**
|
|
586
|
-
*
|
|
587
|
-
*
|
|
588
|
-
* Standard embedded registration flow response containing UI components
|
|
589
|
-
* that should be rendered within the current application context.
|
|
590
|
-
* Most common type for embedded user registration.
|
|
459
|
+
* Get log level string
|
|
591
460
|
*/
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
461
|
+
static getLevelString(level) {
|
|
462
|
+
switch (level) {
|
|
463
|
+
case "debug": return "DEBUG";
|
|
464
|
+
case "info": return "INFO";
|
|
465
|
+
case "warn": return "WARN";
|
|
466
|
+
case "error": return "ERROR";
|
|
467
|
+
default: return "UNKNOWN";
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Format message for Node.js terminal
|
|
472
|
+
*/
|
|
473
|
+
formatForNode(level, message) {
|
|
474
|
+
const parts = [];
|
|
475
|
+
if (this.config.timestamps) parts.push(`${COLORS.gray}[${Logger.getTimestamp()}]${COLORS.reset}`);
|
|
476
|
+
if (this.config.prefix) parts.push(`${COLORS.magenta}${this.config.prefix}${COLORS.reset}`);
|
|
477
|
+
if (this.config.showLevel) {
|
|
478
|
+
const levelStr = Logger.getLevelString(level);
|
|
479
|
+
let coloredLevel;
|
|
480
|
+
switch (level) {
|
|
481
|
+
case "debug":
|
|
482
|
+
coloredLevel = `${COLORS.gray}[${levelStr}]${COLORS.reset}`;
|
|
483
|
+
break;
|
|
484
|
+
case "info":
|
|
485
|
+
coloredLevel = `${COLORS.blue}[${levelStr}]${COLORS.reset}`;
|
|
486
|
+
break;
|
|
487
|
+
case "warn":
|
|
488
|
+
coloredLevel = `${COLORS.yellow}[${levelStr}]${COLORS.reset}`;
|
|
489
|
+
break;
|
|
490
|
+
case "error":
|
|
491
|
+
coloredLevel = `${COLORS.red}[${levelStr}]${COLORS.reset}`;
|
|
492
|
+
break;
|
|
493
|
+
default: coloredLevel = `[${levelStr}]`;
|
|
494
|
+
}
|
|
495
|
+
parts.push(coloredLevel);
|
|
496
|
+
}
|
|
497
|
+
parts.push(message);
|
|
498
|
+
return parts.join(" ");
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Log message using appropriate method
|
|
502
|
+
*/
|
|
503
|
+
logMessage(level, message, ...args) {
|
|
504
|
+
if (!this.shouldLog(level)) return;
|
|
505
|
+
if (this.config.formatter) {
|
|
506
|
+
this.config.formatter(level, message, ...args);
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
if (isBrowser()) this.logToBrowser(level, message, ...args);
|
|
510
|
+
else if (isNode()) this.logToNode(level, message, ...args);
|
|
511
|
+
else console.log(message, ...args);
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Log to browser console with styling
|
|
515
|
+
*/
|
|
516
|
+
logToBrowser(level, message, ...args) {
|
|
517
|
+
const parts = [];
|
|
518
|
+
const styles = [];
|
|
519
|
+
if (this.config.timestamps) {
|
|
520
|
+
parts.push(`%c[${Logger.getTimestamp()}]`);
|
|
521
|
+
styles.push(BROWSER_STYLES.timestamp);
|
|
522
|
+
}
|
|
523
|
+
if (this.config.prefix) {
|
|
524
|
+
parts.push(`%c${this.config.prefix}`);
|
|
525
|
+
styles.push(BROWSER_STYLES.prefix);
|
|
526
|
+
}
|
|
527
|
+
if (this.config.showLevel) {
|
|
528
|
+
const levelStr = Logger.getLevelString(level);
|
|
529
|
+
parts.push(`%c[${levelStr}]`);
|
|
530
|
+
switch (level) {
|
|
531
|
+
case "debug":
|
|
532
|
+
styles.push(BROWSER_STYLES.debug);
|
|
533
|
+
break;
|
|
534
|
+
case "info":
|
|
535
|
+
styles.push(BROWSER_STYLES.info);
|
|
536
|
+
break;
|
|
537
|
+
case "warn":
|
|
538
|
+
styles.push(BROWSER_STYLES.warn);
|
|
539
|
+
break;
|
|
540
|
+
case "error":
|
|
541
|
+
styles.push(BROWSER_STYLES.error);
|
|
542
|
+
break;
|
|
543
|
+
default: styles.push("");
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
parts.push(`%c${message}`);
|
|
547
|
+
styles.push("color: inherit; font-weight: normal;");
|
|
548
|
+
const formattedMessage = parts.join(" ");
|
|
549
|
+
switch (level) {
|
|
550
|
+
case "debug":
|
|
551
|
+
console.debug(formattedMessage, ...styles, ...args);
|
|
552
|
+
break;
|
|
553
|
+
case "info":
|
|
554
|
+
console.info(formattedMessage, ...styles, ...args);
|
|
555
|
+
break;
|
|
556
|
+
case "warn":
|
|
557
|
+
console.warn(formattedMessage, ...styles, ...args);
|
|
558
|
+
break;
|
|
559
|
+
case "error":
|
|
560
|
+
console.error(formattedMessage, ...styles, ...args);
|
|
561
|
+
break;
|
|
562
|
+
default: console.log(formattedMessage, ...styles, ...args);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Log to Node.js console
|
|
567
|
+
*/
|
|
568
|
+
logToNode(level, message, ...args) {
|
|
569
|
+
const formattedMessage = this.formatForNode(level, message);
|
|
570
|
+
switch (level) {
|
|
571
|
+
case "debug":
|
|
572
|
+
console.debug(formattedMessage, ...args);
|
|
573
|
+
break;
|
|
574
|
+
case "info":
|
|
575
|
+
console.info(formattedMessage, ...args);
|
|
576
|
+
break;
|
|
577
|
+
case "warn":
|
|
578
|
+
console.warn(formattedMessage, ...args);
|
|
579
|
+
break;
|
|
580
|
+
case "error":
|
|
581
|
+
console.error(formattedMessage, ...args);
|
|
582
|
+
break;
|
|
583
|
+
default: console.log(formattedMessage, ...args);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Log debug message
|
|
588
|
+
*/
|
|
589
|
+
debug(message, ...args) {
|
|
590
|
+
this.logMessage("debug", message, ...args);
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Log info message
|
|
594
|
+
*/
|
|
595
|
+
info(message, ...args) {
|
|
596
|
+
this.logMessage("info", message, ...args);
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Log warning message
|
|
600
|
+
*/
|
|
601
|
+
warn(message, ...args) {
|
|
602
|
+
this.logMessage("warn", message, ...args);
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* Log error message
|
|
606
|
+
*/
|
|
607
|
+
error(message, ...args) {
|
|
608
|
+
this.logMessage("error", message, ...args);
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* Create a child logger with additional prefix
|
|
612
|
+
*/
|
|
613
|
+
child(prefix) {
|
|
614
|
+
const childPrefix = this.config.prefix ? `${this.config.prefix} - ${prefix}` : prefix;
|
|
615
|
+
return new Logger({
|
|
616
|
+
...this.config,
|
|
617
|
+
prefix: childPrefix
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* Set log level
|
|
622
|
+
*/
|
|
623
|
+
setLevel(level) {
|
|
624
|
+
this.config.level = level;
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* Get current log level
|
|
628
|
+
*/
|
|
629
|
+
getLevel() {
|
|
630
|
+
return this.config.level;
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
/**
|
|
634
|
+
* Default logger instance
|
|
635
|
+
*/
|
|
636
|
+
const logger = new Logger();
|
|
637
|
+
/**
|
|
638
|
+
* Create a new logger instance with custom configuration
|
|
639
|
+
*/
|
|
640
|
+
const createLogger = (config) => new Logger(config);
|
|
641
|
+
/**
|
|
642
|
+
* Default export - global logger instance
|
|
643
|
+
*/
|
|
644
|
+
var logger_default = logger;
|
|
645
|
+
/**
|
|
646
|
+
* Named exports for convenience
|
|
647
|
+
*/
|
|
648
|
+
const debug = (message, ...args) => logger.debug(message, ...args);
|
|
649
|
+
const info = (message, ...args) => logger.info(message, ...args);
|
|
650
|
+
const warn = (message, ...args) => logger.warn(message, ...args);
|
|
651
|
+
const error = (message, ...args) => logger.error(message, ...args);
|
|
652
|
+
/**
|
|
653
|
+
* Configure the default logger
|
|
654
|
+
*/
|
|
655
|
+
const configure = (config) => logger.configure(config);
|
|
656
|
+
/**
|
|
657
|
+
* Create component-specific loggers
|
|
658
|
+
*/
|
|
659
|
+
const createComponentLogger = (component) => logger.child(component);
|
|
660
|
+
/**
|
|
661
|
+
* Create package-specific logger
|
|
662
|
+
*/
|
|
663
|
+
const createPackageLogger = (packageName) => createLogger({
|
|
664
|
+
level: "info",
|
|
665
|
+
prefix: `${PREFIX} - ${packageName}`,
|
|
666
|
+
showLevel: true,
|
|
667
|
+
timestamps: true
|
|
668
|
+
});
|
|
669
|
+
/**
|
|
670
|
+
* Create package component logger (package + component)
|
|
671
|
+
*/
|
|
672
|
+
const createPackageComponentLogger = (packageName, component) => {
|
|
673
|
+
return createPackageLogger(packageName).child(component);
|
|
674
|
+
};
|
|
675
|
+
|
|
676
|
+
//#endregion
|
|
677
|
+
//#region src/api/executeEmbeddedSignInFlow.ts
|
|
678
|
+
const readErrorAssertion = (body) => {
|
|
679
|
+
try {
|
|
680
|
+
return JSON.parse(body).errorAssertion;
|
|
681
|
+
} catch {
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
};
|
|
685
|
+
const postAuthCallback = async (baseUrl, body, headers) => {
|
|
686
|
+
const oauth2Response = await fetch(`${baseUrl}/oauth2/auth/callback`, {
|
|
687
|
+
body: JSON.stringify(body),
|
|
688
|
+
credentials: "include",
|
|
689
|
+
headers: {
|
|
690
|
+
Accept: "application/json",
|
|
691
|
+
"Content-Type": "application/json",
|
|
692
|
+
...headers
|
|
693
|
+
},
|
|
694
|
+
method: "POST"
|
|
695
|
+
});
|
|
696
|
+
if (!oauth2Response.ok) {
|
|
697
|
+
const oauth2ErrorText = await oauth2Response.text();
|
|
698
|
+
logger_default.error(`OAuth2 authorization failed. The callback responded ${oauth2Response.status} ${oauth2Response.statusText}:`, oauth2ErrorText);
|
|
699
|
+
throw new ThunderIDAPIError("OAuth2 authorization failed", "executeEmbeddedSignInFlow-OAuth2Error-002", "javascript", oauth2Response.status, oauth2Response.statusText);
|
|
700
|
+
}
|
|
701
|
+
return oauth2Response.json();
|
|
702
|
+
};
|
|
703
|
+
const relayFailure = async (baseUrl, authId, errorAssertion, headers, flowResponse) => {
|
|
704
|
+
const oauth2Result = await postAuthCallback(baseUrl, {
|
|
705
|
+
assertion: errorAssertion,
|
|
706
|
+
authId
|
|
707
|
+
}, headers);
|
|
708
|
+
return {
|
|
709
|
+
...flowResponse,
|
|
710
|
+
flowStatus: EmbeddedSignInFlowStatus.Error,
|
|
711
|
+
redirectUrl: oauth2Result["redirect_uri"]
|
|
712
|
+
};
|
|
713
|
+
};
|
|
714
|
+
const executeEmbeddedSignInFlow = async ({ url, baseUrl, payload, authId, flowSecret,...requestConfig }) => {
|
|
715
|
+
if (!payload) throw new ThunderIDAPIError("Authorization payload is required", "executeEmbeddedSignInFlow-ValidationError-002", "javascript", 400, "If an authorization payload is not provided, the request cannot be constructed correctly.");
|
|
716
|
+
const endpoint = url ?? `${baseUrl}/flow/execute`;
|
|
717
|
+
const cleanPayload = typeof payload === "object" && payload !== null ? Object.fromEntries(Object.entries(payload).filter(([key]) => key !== "verbose")) : payload;
|
|
718
|
+
const isNewFlowStart = typeof cleanPayload === "object" && cleanPayload !== null && "applicationId" in cleanPayload && "flowType" in cleanPayload;
|
|
719
|
+
const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "executionId" in cleanPayload && Object.keys(cleanPayload).length === 1;
|
|
720
|
+
const basePayload = isNewFlowStart ? injectRequestedPermissions_default(cleanPayload) : cleanPayload;
|
|
721
|
+
const requestPayload = isNewFlowStart || hasOnlyFlowId ? {
|
|
722
|
+
...basePayload,
|
|
723
|
+
verbose: true
|
|
724
|
+
} : basePayload;
|
|
725
|
+
const response = await fetch(endpoint, {
|
|
726
|
+
...requestConfig,
|
|
727
|
+
body: JSON.stringify(requestPayload),
|
|
728
|
+
headers: {
|
|
729
|
+
Accept: "application/json",
|
|
730
|
+
"Content-Type": "application/json",
|
|
731
|
+
...isNewFlowStart && flowSecret ? { "Flow-Secret": flowSecret } : {},
|
|
732
|
+
...requestConfig.headers
|
|
733
|
+
},
|
|
734
|
+
method: requestConfig.method || "POST"
|
|
735
|
+
});
|
|
736
|
+
if (!response.ok) {
|
|
737
|
+
const errorText = await response.text();
|
|
738
|
+
const errorAssertion = readErrorAssertion(errorText);
|
|
739
|
+
if (authId && errorAssertion) return await relayFailure(baseUrl, authId, errorAssertion, requestConfig.headers);
|
|
740
|
+
throw new ThunderIDAPIError(errorText, "executeEmbeddedSignInFlow-ResponseError-001", "javascript", response.status, response.statusText, "Authorization request failed");
|
|
741
|
+
}
|
|
742
|
+
const flowResponse = await response.json();
|
|
743
|
+
if (flowResponse.flowStatus === EmbeddedSignInFlowStatus.Complete && flowResponse.assertion && authId) try {
|
|
744
|
+
const oauth2Result = await postAuthCallback(baseUrl, {
|
|
745
|
+
assertion: flowResponse.assertion,
|
|
746
|
+
authId
|
|
747
|
+
}, requestConfig.headers);
|
|
748
|
+
return {
|
|
749
|
+
flowStatus: flowResponse.flowStatus,
|
|
750
|
+
redirectUrl: oauth2Result["redirect_uri"]
|
|
751
|
+
};
|
|
752
|
+
} catch (authError) {
|
|
753
|
+
if (authError instanceof ThunderIDAPIError) throw authError;
|
|
754
|
+
throw new ThunderIDAPIError(authError instanceof Error ? authError.message : "Unknown error", "executeEmbeddedSignInFlow-OAuth2Error-001", "javascript", 500, "Failed to complete OAuth2 authorization after successful embedded sign-in flow.", "OAuth2 authorization failed");
|
|
755
|
+
}
|
|
756
|
+
if (flowResponse.flowStatus === EmbeddedSignInFlowStatus.Error && flowResponse.errorAssertion && authId) return relayFailure(baseUrl, authId, flowResponse.errorAssertion, requestConfig.headers, flowResponse);
|
|
757
|
+
return flowResponse;
|
|
758
|
+
};
|
|
759
|
+
var executeEmbeddedSignInFlow_default = executeEmbeddedSignInFlow;
|
|
760
|
+
|
|
761
|
+
//#endregion
|
|
762
|
+
//#region src/models/embedded-signup-flow.ts
|
|
763
|
+
/**
|
|
764
|
+
* Status enumeration for ThunderID embedded sign-up flow operations.
|
|
765
|
+
*
|
|
766
|
+
* These statuses indicate the current state of the registration flow and determine
|
|
767
|
+
* the next action required by the client application. Each status provides specific
|
|
768
|
+
* guidance on how to proceed with the user registration process.
|
|
769
|
+
*
|
|
770
|
+
* @example
|
|
771
|
+
* ```typescript
|
|
772
|
+
* switch (response.flowStatus) {
|
|
773
|
+
* case EmbeddedSignUpFlowStatus.Incomplete:
|
|
774
|
+
* // More user input needed - render registration form components
|
|
775
|
+
* break;
|
|
776
|
+
* case EmbeddedSignUpFlowStatus.Complete:
|
|
777
|
+
* // Registration successful - handle completion
|
|
778
|
+
* break;
|
|
779
|
+
* case EmbeddedSignUpFlowStatus.Error:
|
|
780
|
+
* // Registration failed - show error details
|
|
781
|
+
* const errorResponse = response as EmbeddedSignUpFlowErrorResponse;
|
|
782
|
+
* showError(errorResponse.error.description.defaultValue);
|
|
783
|
+
* break;
|
|
784
|
+
* }
|
|
785
|
+
* ```
|
|
786
|
+
*
|
|
787
|
+
* @experimental Part of the new ThunderID API
|
|
788
|
+
*/
|
|
789
|
+
let EmbeddedSignUpFlowStatus = /* @__PURE__ */ function(EmbeddedSignUpFlowStatus$1) {
|
|
790
|
+
/**
|
|
791
|
+
* Sign-up flow completed successfully.
|
|
792
|
+
*
|
|
793
|
+
* The user has successfully registered and the flow can proceed to
|
|
794
|
+
* OAuth2 completion or redirection. Check for redirectUrl or assertion
|
|
795
|
+
* data in the response for next steps.
|
|
796
|
+
*/
|
|
797
|
+
EmbeddedSignUpFlowStatus$1["Complete"] = "COMPLETE";
|
|
798
|
+
/**
|
|
799
|
+
* Sign-up flow encountered an error and cannot proceed.
|
|
800
|
+
*
|
|
801
|
+
* Registration failed due to validation errors, duplicate user,
|
|
802
|
+
* system errors, or other issues. The response will be of type
|
|
803
|
+
* `EmbeddedSignUpFlowErrorResponse` containing detailed failure
|
|
804
|
+
* information that can be displayed to the user.
|
|
805
|
+
*
|
|
806
|
+
* @see {@link EmbeddedSignUpFlowErrorResponse} for error response structure
|
|
807
|
+
*/
|
|
808
|
+
EmbeddedSignUpFlowStatus$1["Error"] = "ERROR";
|
|
809
|
+
/**
|
|
810
|
+
* Sign-up flow requires additional user input.
|
|
811
|
+
*
|
|
812
|
+
* More registration steps are needed. The response will contain
|
|
813
|
+
* components in data.meta.components that should be rendered to
|
|
814
|
+
* collect additional user information (e.g., profile data, verification).
|
|
815
|
+
*/
|
|
816
|
+
EmbeddedSignUpFlowStatus$1["Incomplete"] = "INCOMPLETE";
|
|
817
|
+
return EmbeddedSignUpFlowStatus$1;
|
|
818
|
+
}({});
|
|
819
|
+
/**
|
|
820
|
+
* Type enumeration for ThunderID embedded sign-up flow responses.
|
|
821
|
+
*
|
|
822
|
+
* Determines the nature of the registration flow response and how the client
|
|
823
|
+
* should handle the returned data. This affects both UI rendering and flow
|
|
824
|
+
* continuation logic during the user registration process.
|
|
825
|
+
*
|
|
826
|
+
* @experimental Part of the new ThunderID API
|
|
827
|
+
*/
|
|
828
|
+
let EmbeddedSignUpFlowType = /* @__PURE__ */ function(EmbeddedSignUpFlowType$1) {
|
|
829
|
+
/**
|
|
830
|
+
* Response requires external redirection.
|
|
831
|
+
*
|
|
832
|
+
* Used for social registration providers, external identity providers,
|
|
833
|
+
* or other flows that require navigating to an external URL during
|
|
834
|
+
* the registration process. The response will contain redirection information.
|
|
835
|
+
*/
|
|
836
|
+
EmbeddedSignUpFlowType$1["Redirection"] = "REDIRECTION";
|
|
837
|
+
/**
|
|
838
|
+
* Response contains view components for rendering.
|
|
839
|
+
*
|
|
840
|
+
* Standard embedded registration flow response containing UI components
|
|
841
|
+
* that should be rendered within the current application context.
|
|
842
|
+
* Most common type for embedded user registration.
|
|
843
|
+
*/
|
|
844
|
+
EmbeddedSignUpFlowType$1["View"] = "VIEW";
|
|
845
|
+
return EmbeddedSignUpFlowType$1;
|
|
846
|
+
}({});
|
|
847
|
+
|
|
848
|
+
//#endregion
|
|
849
|
+
//#region src/api/executeEmbeddedSignUpFlow.ts
|
|
850
|
+
const executeEmbeddedSignUpFlow = async ({ url, baseUrl, payload, authId,...requestConfig }) => {
|
|
851
|
+
if (!payload) throw new ThunderIDAPIError("Registration payload is required", "executeEmbeddedSignUpFlow-ValidationError-002", "javascript", 400, "If a registration payload is not provided, the request cannot be constructed correctly.");
|
|
852
|
+
const endpoint = url ?? `${baseUrl}/flow/execute`;
|
|
853
|
+
const cleanPayload = typeof payload === "object" && payload !== null ? Object.fromEntries(Object.entries(payload).filter(([key]) => key !== "verbose")) : payload;
|
|
854
|
+
const isNewFlowStart = typeof cleanPayload === "object" && cleanPayload !== null && "applicationId" in cleanPayload && "flowType" in cleanPayload;
|
|
855
|
+
const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "executionId" in cleanPayload && Object.keys(cleanPayload).length === 1;
|
|
856
|
+
const basePayload = isNewFlowStart ? injectRequestedPermissions_default(cleanPayload) : cleanPayload;
|
|
857
|
+
const requestPayload = isNewFlowStart || hasOnlyFlowId ? {
|
|
858
|
+
...basePayload,
|
|
859
|
+
verbose: true
|
|
860
|
+
} : basePayload;
|
|
861
|
+
const response = await fetch(endpoint, {
|
|
862
|
+
...requestConfig,
|
|
863
|
+
body: JSON.stringify(requestPayload),
|
|
864
|
+
headers: {
|
|
865
|
+
Accept: "application/json",
|
|
866
|
+
"Content-Type": "application/json",
|
|
867
|
+
...requestConfig.headers
|
|
868
|
+
},
|
|
869
|
+
method: requestConfig.method || "POST"
|
|
870
|
+
});
|
|
871
|
+
if (!response.ok) throw new ThunderIDAPIError(await response.text(), "executeEmbeddedSignUpFlow-ResponseError-001", "javascript", response.status, response.statusText, "Registration request failed");
|
|
872
|
+
const flowResponse = await response.json();
|
|
873
|
+
if (flowResponse.flowStatus === EmbeddedSignUpFlowStatus.Complete && flowResponse.assertion && authId) try {
|
|
874
|
+
const oauth2Response = await fetch(`${baseUrl}/oauth2/auth/callback`, {
|
|
875
|
+
body: JSON.stringify({
|
|
876
|
+
assertion: flowResponse.assertion,
|
|
625
877
|
authId
|
|
626
878
|
}),
|
|
627
879
|
credentials: "include",
|
|
@@ -710,23 +962,6 @@ var executeEmbeddedRecoveryFlow_default = executeEmbeddedRecoveryFlow;
|
|
|
710
962
|
|
|
711
963
|
//#endregion
|
|
712
964
|
//#region src/models/embedded-flow.ts
|
|
713
|
-
/**
|
|
714
|
-
* Copyright (c) 2025-2026, WSO2 LLC. (https://www.wso2.com).
|
|
715
|
-
*
|
|
716
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
717
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
718
|
-
* in compliance with the License.
|
|
719
|
-
* You may obtain a copy of the License at
|
|
720
|
-
*
|
|
721
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
722
|
-
*
|
|
723
|
-
* Unless required by applicable law or agreed to in writing,
|
|
724
|
-
* software distributed under the License is distributed on an
|
|
725
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
726
|
-
* KIND, either express or implied. See the License for the
|
|
727
|
-
* specific language governing permissions and limitations
|
|
728
|
-
* under the License.
|
|
729
|
-
*/
|
|
730
965
|
let EmbeddedFlowType = /* @__PURE__ */ function(EmbeddedFlowType$1) {
|
|
731
966
|
EmbeddedFlowType$1["Authentication"] = "AUTHENTICATION";
|
|
732
967
|
EmbeddedFlowType$1["Recovery"] = "RECOVERY";
|
|
@@ -1091,23 +1326,6 @@ var getUserInfo_default = getUserInfo;
|
|
|
1091
1326
|
//#endregion
|
|
1092
1327
|
//#region src/utils/processUsername.ts
|
|
1093
1328
|
/**
|
|
1094
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
1095
|
-
*
|
|
1096
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
1097
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
1098
|
-
* in compliance with the License.
|
|
1099
|
-
* You may obtain a copy of the License at
|
|
1100
|
-
*
|
|
1101
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1102
|
-
*
|
|
1103
|
-
* Unless required by applicable law or agreed to in writing,
|
|
1104
|
-
* software distributed under the License is distributed on an
|
|
1105
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
1106
|
-
* KIND, either express or implied. See the License for the
|
|
1107
|
-
* specific language governing permissions and limitations
|
|
1108
|
-
* under the License.
|
|
1109
|
-
*/
|
|
1110
|
-
/**
|
|
1111
1329
|
* Regular expression to match userstore prefixes in usernames.
|
|
1112
1330
|
* Matches patterns like "DEFAULT/", "ASGARDEO_USER/", "PRIMARY/", etc.
|
|
1113
1331
|
* The pattern matches any uppercase letters, numbers, and underscores followed by a forward slash.
|
|
@@ -1342,23 +1560,6 @@ var updateMeProfile_default = updateMeProfile;
|
|
|
1342
1560
|
//#endregion
|
|
1343
1561
|
//#region src/constants/ApplicationNativeAuthenticationConstants.ts
|
|
1344
1562
|
/**
|
|
1345
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
1346
|
-
*
|
|
1347
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
1348
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
1349
|
-
* in compliance with the License.
|
|
1350
|
-
* You may obtain a copy of the License at
|
|
1351
|
-
*
|
|
1352
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1353
|
-
*
|
|
1354
|
-
* Unless required by applicable law or agreed to in writing,
|
|
1355
|
-
* software distributed under the License is distributed on an
|
|
1356
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
1357
|
-
* KIND, either express or implied. See the License for the
|
|
1358
|
-
* specific language governing permissions and limitations
|
|
1359
|
-
* under the License.
|
|
1360
|
-
*/
|
|
1361
|
-
/**
|
|
1362
1563
|
* Constants representing Application Native Authentication related configurations and constants.
|
|
1363
1564
|
*/
|
|
1364
1565
|
const ApplicationNativeAuthenticationConstants = { SupportedAuthenticators: {
|
|
@@ -1382,23 +1583,6 @@ var ApplicationNativeAuthenticationConstants_default = ApplicationNativeAuthenti
|
|
|
1382
1583
|
//#endregion
|
|
1383
1584
|
//#region src/constants/ScopeConstants.ts
|
|
1384
1585
|
/**
|
|
1385
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
1386
|
-
*
|
|
1387
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
1388
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
1389
|
-
* in compliance with the License.
|
|
1390
|
-
* You may obtain a copy of the License at
|
|
1391
|
-
*
|
|
1392
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1393
|
-
*
|
|
1394
|
-
* Unless required by applicable law or agreed to in writing,
|
|
1395
|
-
* software distributed under the License is distributed on an
|
|
1396
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
1397
|
-
* KIND, either express or implied. See the License for the
|
|
1398
|
-
* specific language governing permissions and limitations
|
|
1399
|
-
* under the License.
|
|
1400
|
-
*/
|
|
1401
|
-
/**
|
|
1402
1586
|
* Constants for OAuth 2.0 and OpenID Connect scopes.
|
|
1403
1587
|
* These scopes define the level of access that the client application
|
|
1404
1588
|
* is requesting from the authorization server.
|
|
@@ -1433,778 +1617,376 @@ const OIDCRequestConstants = {
|
|
|
1433
1617
|
Params: {
|
|
1434
1618
|
AUTHORIZATION_CODE: "code",
|
|
1435
1619
|
SESSION_STATE: "session_state",
|
|
1436
|
-
SIGN_OUT_SUCCESS: "sign_out_success",
|
|
1437
|
-
STATE: "state"
|
|
1438
|
-
},
|
|
1439
|
-
SignIn: { Payload: { DEFAULT_SCOPES: [ScopeConstants_default.OPENID, ScopeConstants_default.PROFILE] } },
|
|
1440
|
-
SignOut: { Storage: { StorageKeys: { SIGN_OUT_URL: "sign_out_url" } } }
|
|
1441
|
-
};
|
|
1442
|
-
var OIDCRequestConstants_default = OIDCRequestConstants;
|
|
1443
|
-
|
|
1444
|
-
//#endregion
|
|
1445
|
-
//#region src/constants/VendorConstants.ts
|
|
1446
|
-
/**
|
|
1447
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
1448
|
-
*
|
|
1449
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
1450
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
1451
|
-
* in compliance with the License.
|
|
1452
|
-
* You may obtain a copy of the License at
|
|
1453
|
-
*
|
|
1454
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1455
|
-
*
|
|
1456
|
-
* Unless required by applicable law or agreed to in writing,
|
|
1457
|
-
* software distributed under the License is distributed on an
|
|
1458
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
1459
|
-
* KIND, either express or implied. See the License for the
|
|
1460
|
-
* specific language governing permissions and limitations
|
|
1461
|
-
* under the License.
|
|
1462
|
-
*/
|
|
1463
|
-
/**
|
|
1464
|
-
* Constants for vendor-specific configurations.
|
|
1465
|
-
* By default, the vendor is inferred as ThunderID.
|
|
1466
|
-
*
|
|
1467
|
-
* @example
|
|
1468
|
-
* ```typescript
|
|
1469
|
-
* // Using the vendor prefix in a URL
|
|
1470
|
-
* const apiUrl = `${VendorConstants.VENDOR_PREFIX}/api/v1/resource`;
|
|
1471
|
-
* ```
|
|
1472
|
-
*/
|
|
1473
|
-
const VendorConstants = { VENDOR_PREFIX: "thunderid" };
|
|
1474
|
-
var VendorConstants_default = VendorConstants;
|
|
1475
|
-
|
|
1476
|
-
//#endregion
|
|
1477
|
-
//#region src/errors/ThunderIDRuntimeError.ts
|
|
1478
|
-
/**
|
|
1479
|
-
* Base class for all runtime errors in ThunderID. This class extends ThunderIDError
|
|
1480
|
-
* and adds support for additional error details. Use this class for errors that occur
|
|
1481
|
-
* during runtime execution that are not related to API calls.
|
|
1482
|
-
*
|
|
1483
|
-
* @example
|
|
1484
|
-
* ```typescript
|
|
1485
|
-
* throw new ThunderIDRuntimeError(
|
|
1486
|
-
* "Failed to parse configuration",
|
|
1487
|
-
* "CONFIG_PARSE_ERROR",
|
|
1488
|
-
* { invalidField: "redirectUri" }
|
|
1489
|
-
* );
|
|
1490
|
-
* ```
|
|
1491
|
-
*/
|
|
1492
|
-
var ThunderIDRuntimeError = class extends ThunderIDError {
|
|
1493
|
-
/**
|
|
1494
|
-
* Creates an instance of ThunderIDRuntimeError.
|
|
1495
|
-
*
|
|
1496
|
-
* @param message - Human-readable description of the error
|
|
1497
|
-
* @param code - A unique error code that identifies the error type
|
|
1498
|
-
* @param details - Additional details about the error that might be helpful for debugging
|
|
1499
|
-
* @param origin - Optional. The SDK origin (e.g. 'react', 'vue'). Defaults to generic 'ThunderID'
|
|
1500
|
-
* @constructor
|
|
1501
|
-
*/
|
|
1502
|
-
constructor(message, code, origin, details) {
|
|
1503
|
-
super(message, code, origin);
|
|
1504
|
-
this.details = details;
|
|
1505
|
-
Object.defineProperty(this, "name", {
|
|
1506
|
-
configurable: true,
|
|
1507
|
-
value: "ThunderIDRuntimeError",
|
|
1508
|
-
writable: true
|
|
1509
|
-
});
|
|
1510
|
-
}
|
|
1511
|
-
/**
|
|
1512
|
-
* Returns a string representation of the runtime error
|
|
1513
|
-
* @returns Formatted error string with name, code, details, and message
|
|
1514
|
-
*/
|
|
1515
|
-
toString() {
|
|
1516
|
-
const details = this.details ? `\nDetails: ${JSON.stringify(this.details, null, 2)}` : "";
|
|
1517
|
-
return `[${this.name}] (code="${this.code}")${details}\nMessage: ${this.message}`;
|
|
1518
|
-
}
|
|
1519
|
-
};
|
|
1520
|
-
|
|
1521
|
-
//#endregion
|
|
1522
|
-
//#region src/models/embedded-recovery-flow.ts
|
|
1523
|
-
/**
|
|
1524
|
-
* Status enumeration for the embedded recovery flow operations.
|
|
1525
|
-
*
|
|
1526
|
-
* @experimental Part of the new ThunderID API
|
|
1527
|
-
*/
|
|
1528
|
-
let EmbeddedRecoveryFlowStatus = /* @__PURE__ */ function(EmbeddedRecoveryFlowStatus$1) {
|
|
1529
|
-
/**
|
|
1530
|
-
* Recovery flow completed successfully.
|
|
1531
|
-
*/
|
|
1532
|
-
EmbeddedRecoveryFlowStatus$1["Complete"] = "COMPLETE";
|
|
1533
|
-
/**
|
|
1534
|
-
* Recovery flow encountered an error and cannot proceed.
|
|
1535
|
-
*
|
|
1536
|
-
* @see {@link EmbeddedRecoveryFlowErrorResponse} for error response structure
|
|
1537
|
-
*/
|
|
1538
|
-
EmbeddedRecoveryFlowStatus$1["Error"] = "ERROR";
|
|
1539
|
-
/**
|
|
1540
|
-
* Recovery flow requires additional user input.
|
|
1541
|
-
*/
|
|
1542
|
-
EmbeddedRecoveryFlowStatus$1["Incomplete"] = "INCOMPLETE";
|
|
1543
|
-
return EmbeddedRecoveryFlowStatus$1;
|
|
1544
|
-
}({});
|
|
1545
|
-
/**
|
|
1546
|
-
* Type enumeration for embedded recovery flow responses.
|
|
1547
|
-
*
|
|
1548
|
-
* @experimental Part of the new ThunderID API
|
|
1549
|
-
*/
|
|
1550
|
-
let EmbeddedRecoveryFlowType = /* @__PURE__ */ function(EmbeddedRecoveryFlowType$1) {
|
|
1551
|
-
/**
|
|
1552
|
-
* Response requires external redirection.
|
|
1553
|
-
*/
|
|
1554
|
-
EmbeddedRecoveryFlowType$1["Redirection"] = "REDIRECTION";
|
|
1555
|
-
/**
|
|
1556
|
-
* Response contains view components for rendering.
|
|
1557
|
-
*/
|
|
1558
|
-
EmbeddedRecoveryFlowType$1["View"] = "VIEW";
|
|
1559
|
-
return EmbeddedRecoveryFlowType$1;
|
|
1560
|
-
}({});
|
|
1561
|
-
|
|
1562
|
-
//#endregion
|
|
1563
|
-
//#region src/models/flow-meta.ts
|
|
1564
|
-
/**
|
|
1565
|
-
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
|
|
1566
|
-
*
|
|
1567
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
1568
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
1569
|
-
* in compliance with the License.
|
|
1570
|
-
* You may obtain a copy of the License at
|
|
1571
|
-
*
|
|
1572
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1573
|
-
*
|
|
1574
|
-
* Unless required by applicable law or agreed to in writing,
|
|
1575
|
-
* software distributed under the License is distributed on an
|
|
1576
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
1577
|
-
* KIND, either express or implied. See the License for the
|
|
1578
|
-
* specific language governing permissions and limitations
|
|
1579
|
-
* under the License.
|
|
1580
|
-
*/
|
|
1581
|
-
/**
|
|
1582
|
-
* The type of entity to retrieve flow metadata for.
|
|
1583
|
-
*
|
|
1584
|
-
* @example
|
|
1585
|
-
* ```typescript
|
|
1586
|
-
* const config: GetFlowMetaRequestConfig = {
|
|
1587
|
-
* baseUrl: 'https://localhost:8090',
|
|
1588
|
-
* type: FlowMetaType.App,
|
|
1589
|
-
* id: '60a9b38b-6eba-9f9e-55f9-267067de4680',
|
|
1590
|
-
* };
|
|
1591
|
-
* ```
|
|
1592
|
-
*
|
|
1593
|
-
* @experimental This API may change in future versions
|
|
1594
|
-
*/
|
|
1595
|
-
let FlowMetaType = /* @__PURE__ */ function(FlowMetaType$1) {
|
|
1596
|
-
/** Retrieve metadata scoped to a specific application */
|
|
1597
|
-
FlowMetaType$1["App"] = "APP";
|
|
1598
|
-
/** Retrieve metadata scoped to a specific organization unit */
|
|
1599
|
-
FlowMetaType$1["Ou"] = "OU";
|
|
1600
|
-
return FlowMetaType$1;
|
|
1601
|
-
}({});
|
|
1602
|
-
|
|
1603
|
-
//#endregion
|
|
1604
|
-
//#region src/models/flow.ts
|
|
1605
|
-
/**
|
|
1606
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
1607
|
-
*
|
|
1608
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
1609
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
1610
|
-
* in compliance with the License.
|
|
1611
|
-
* You may obtain a copy of the License at
|
|
1612
|
-
*
|
|
1613
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1614
|
-
*
|
|
1615
|
-
* Unless required by applicable law or agreed to in writing,
|
|
1616
|
-
* software distributed under the License is distributed on an
|
|
1617
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
1618
|
-
* KIND, either express or implied. See the License for the
|
|
1619
|
-
* specific language governing permissions and limitations
|
|
1620
|
-
* under the License.
|
|
1621
|
-
*/
|
|
1622
|
-
let FlowMode = /* @__PURE__ */ function(FlowMode$1) {
|
|
1623
|
-
/**
|
|
1624
|
-
* This mode is suitable for embedded sign-in, sign-up, etc. flows where the authentication
|
|
1625
|
-
* UIs are rendered within the application.
|
|
1626
|
-
* @see {@link https://is.docs.wso2.com/en/7.1.0/references/app-native-authentication/}
|
|
1627
|
-
*/
|
|
1628
|
-
FlowMode$1["Embedded"] = "DIRECT";
|
|
1629
|
-
/**
|
|
1630
|
-
* Traditional redirect based sign-in, sign-up, etc. flows where the authentication
|
|
1631
|
-
* UIs are from a external Identity Provider (ex: WSO2 Identity Server or ThunderID).
|
|
1632
|
-
*/
|
|
1633
|
-
FlowMode$1["Redirect"] = "REDIRECTION";
|
|
1634
|
-
return FlowMode$1;
|
|
1635
|
-
}({});
|
|
1636
|
-
|
|
1637
|
-
//#endregion
|
|
1638
|
-
//#region src/models/field.ts
|
|
1639
|
-
/**
|
|
1640
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
1641
|
-
*
|
|
1642
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
1643
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
1644
|
-
* in compliance with the License.
|
|
1645
|
-
* You may obtain a copy of the License at
|
|
1646
|
-
*
|
|
1647
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1648
|
-
*
|
|
1649
|
-
* Unless required by applicable law or agreed to in writing,
|
|
1650
|
-
* software distributed under the License is distributed on an
|
|
1651
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
1652
|
-
* KIND, either express or implied. See the License for the
|
|
1653
|
-
* specific language governing permissions and limitations
|
|
1654
|
-
* under the License.
|
|
1655
|
-
*/
|
|
1656
|
-
let FieldType = /* @__PURE__ */ function(FieldType$1) {
|
|
1657
|
-
FieldType$1["Checkbox"] = "CHECKBOX";
|
|
1658
|
-
FieldType$1["Date"] = "DATE";
|
|
1659
|
-
FieldType$1["Email"] = "EMAIL";
|
|
1660
|
-
FieldType$1["Number"] = "NUMBER";
|
|
1661
|
-
FieldType$1["Otp"] = "OTP";
|
|
1662
|
-
FieldType$1["Password"] = "PASSWORD";
|
|
1663
|
-
FieldType$1["Radio"] = "RADIO";
|
|
1664
|
-
FieldType$1["Select"] = "SELECT";
|
|
1665
|
-
FieldType$1["Tel"] = "TEL";
|
|
1666
|
-
FieldType$1["Text"] = "TEXT";
|
|
1667
|
-
FieldType$1["Textarea"] = "TEXTAREA";
|
|
1668
|
-
FieldType$1["Time"] = "TIME";
|
|
1669
|
-
return FieldType$1;
|
|
1670
|
-
}({});
|
|
1671
|
-
|
|
1672
|
-
//#endregion
|
|
1673
|
-
//#region src/constants/OIDCDiscoveryConstants.ts
|
|
1674
|
-
/**
|
|
1675
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
1676
|
-
*
|
|
1677
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
1678
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
1679
|
-
* in compliance with the License.
|
|
1680
|
-
* You may obtain a copy of the License at
|
|
1681
|
-
*
|
|
1682
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1683
|
-
*
|
|
1684
|
-
* Unless required by applicable law or agreed to in writing,
|
|
1685
|
-
* software distributed under the License is distributed on an
|
|
1686
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
1687
|
-
* KIND, either express or implied. See the License for the
|
|
1688
|
-
* specific language governing permissions and limitations
|
|
1689
|
-
* under the License.
|
|
1690
|
-
*/
|
|
1691
|
-
/**
|
|
1692
|
-
* Constants related to OpenID Connect (OIDC) metadata and endpoints.
|
|
1693
|
-
* This object contains all the standard OIDC endpoints and storage keys
|
|
1694
|
-
* used throughout the application for authentication and authorization.
|
|
1695
|
-
*
|
|
1696
|
-
* @remarks
|
|
1697
|
-
* The constants are organized into two main sections:
|
|
1698
|
-
* 1. Endpoints - Contains all OIDC standard endpoint paths
|
|
1699
|
-
* 2. Storage - Contains keys used for storing OIDC-related data
|
|
1700
|
-
*
|
|
1701
|
-
* @example
|
|
1702
|
-
* ```typescript
|
|
1703
|
-
* // Using an endpoint
|
|
1704
|
-
* const authEndpoint = OIDCDiscoveryConstants.Endpoints.AUTHORIZATION;
|
|
1705
|
-
*
|
|
1706
|
-
* // Using a storage key
|
|
1707
|
-
* const tokenKey = OIDCDiscoveryConstants.Storage.StorageKeys.Endpoints.TOKEN;
|
|
1708
|
-
* ```
|
|
1709
|
-
*/
|
|
1710
|
-
const OIDCDiscoveryConstants = {
|
|
1711
|
-
Endpoints: {
|
|
1712
|
-
AUTHORIZATION: "/oauth2/authorize",
|
|
1713
|
-
END_SESSION: "/oauth2/logout",
|
|
1714
|
-
ISSUER: "/oauth2/token",
|
|
1715
|
-
JWKS: "/oauth2/jwks",
|
|
1716
|
-
REVOCATION: "/oauth2/revoke",
|
|
1717
|
-
SESSION_IFRAME: "/oidc/checksession",
|
|
1718
|
-
TOKEN: "/oauth2/token",
|
|
1719
|
-
USERINFO: "/oauth2/userinfo"
|
|
1720
|
-
},
|
|
1721
|
-
Storage: { StorageKeys: {
|
|
1722
|
-
Endpoints: {
|
|
1723
|
-
AUTHORIZATION: "authorization_endpoint",
|
|
1724
|
-
END_SESSION: "end_session_endpoint",
|
|
1725
|
-
ISSUER: "issuer",
|
|
1726
|
-
JWKS: "jwks_uri",
|
|
1727
|
-
REVOCATION: "revocation_endpoint",
|
|
1728
|
-
SESSION_IFRAME: "check_session_iframe",
|
|
1729
|
-
TOKEN: "token_endpoint",
|
|
1730
|
-
USERINFO: "userinfo_endpoint"
|
|
1731
|
-
},
|
|
1732
|
-
OPENID_PROVIDER_CONFIG_INITIATED: "op_config_initiated"
|
|
1733
|
-
} }
|
|
1620
|
+
SIGN_OUT_SUCCESS: "sign_out_success",
|
|
1621
|
+
STATE: "state"
|
|
1622
|
+
},
|
|
1623
|
+
SignIn: { Payload: { DEFAULT_SCOPES: [ScopeConstants_default.OPENID, ScopeConstants_default.PROFILE] } },
|
|
1624
|
+
SignOut: { Storage: { StorageKeys: { SIGN_OUT_URL: "sign_out_url" } } }
|
|
1734
1625
|
};
|
|
1735
|
-
var
|
|
1626
|
+
var OIDCRequestConstants_default = OIDCRequestConstants;
|
|
1736
1627
|
|
|
1737
1628
|
//#endregion
|
|
1738
|
-
//#region src/constants/
|
|
1739
|
-
/**
|
|
1740
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
1741
|
-
*
|
|
1742
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
1743
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
1744
|
-
* in compliance with the License.
|
|
1745
|
-
* You may obtain a copy of the License at
|
|
1746
|
-
*
|
|
1747
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1748
|
-
*
|
|
1749
|
-
* Unless required by applicable law or agreed to in writing,
|
|
1750
|
-
* software distributed under the License is distributed on an
|
|
1751
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
1752
|
-
* KIND, either express or implied. See the License for the
|
|
1753
|
-
* specific language governing permissions and limitations
|
|
1754
|
-
* under the License.
|
|
1755
|
-
*/
|
|
1629
|
+
//#region src/constants/VendorConstants.ts
|
|
1756
1630
|
/**
|
|
1757
|
-
* Constants
|
|
1758
|
-
*
|
|
1759
|
-
* flow in the OAuth 2.0 authorization code grant.
|
|
1760
|
-
*
|
|
1761
|
-
* @remarks
|
|
1762
|
-
* PKCE is an extension to the authorization code flow to prevent CSRF and
|
|
1763
|
-
* authorization code injection attacks. The constants are organized into
|
|
1764
|
-
* storage-related sections for managing PKCE state.
|
|
1631
|
+
* Constants for vendor-specific configurations.
|
|
1632
|
+
* By default, the vendor is inferred as ThunderID.
|
|
1765
1633
|
*
|
|
1766
1634
|
* @example
|
|
1767
1635
|
* ```typescript
|
|
1768
|
-
*
|
|
1769
|
-
* const
|
|
1770
|
-
* const separator = PKCEConstants.Storage.StorageKeys.SEPARATOR;
|
|
1636
|
+
* // Using the vendor prefix in a URL
|
|
1637
|
+
* const apiUrl = `${VendorConstants.VENDOR_PREFIX}/api/v1/resource`;
|
|
1771
1638
|
* ```
|
|
1772
1639
|
*/
|
|
1773
|
-
const
|
|
1774
|
-
|
|
1775
|
-
Storage: { StorageKeys: {
|
|
1776
|
-
CODE_VERIFIER: "pkce_code_verifier",
|
|
1777
|
-
SEPARATOR: "#"
|
|
1778
|
-
} }
|
|
1779
|
-
};
|
|
1780
|
-
var PKCEConstants_default = PKCEConstants;
|
|
1640
|
+
const VendorConstants = { VENDOR_PREFIX: "thunderid" };
|
|
1641
|
+
var VendorConstants_default = VendorConstants;
|
|
1781
1642
|
|
|
1782
1643
|
//#endregion
|
|
1783
|
-
//#region src/
|
|
1644
|
+
//#region src/constants/ConsentConstants.ts
|
|
1784
1645
|
/**
|
|
1785
|
-
*
|
|
1646
|
+
* Constants describing why a set of consent decisions was submitted.
|
|
1786
1647
|
*
|
|
1787
|
-
*
|
|
1788
|
-
*
|
|
1789
|
-
*
|
|
1790
|
-
* You may obtain a copy of the License at
|
|
1791
|
-
*
|
|
1792
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1648
|
+
* @remarks
|
|
1649
|
+
* The reason travels on `ConsentDecisions.reason` and explains a submission the server cannot infer
|
|
1650
|
+
* from the decisions alone. It is omitted when the user approves.
|
|
1793
1651
|
*
|
|
1794
|
-
*
|
|
1795
|
-
*
|
|
1796
|
-
*
|
|
1797
|
-
*
|
|
1798
|
-
*
|
|
1799
|
-
*
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
cache;
|
|
1803
|
-
constructor() {
|
|
1804
|
-
this.cache = /* @__PURE__ */ new Map();
|
|
1805
|
-
}
|
|
1806
|
-
get length() {
|
|
1807
|
-
return this.cache.size;
|
|
1808
|
-
}
|
|
1809
|
-
getItem(key) {
|
|
1810
|
-
return this.cache.get(key) ?? null;
|
|
1811
|
-
}
|
|
1812
|
-
setItem(key, value) {
|
|
1813
|
-
this.cache.set(key, value);
|
|
1814
|
-
}
|
|
1815
|
-
removeItem(key) {
|
|
1816
|
-
this.cache.delete(key);
|
|
1817
|
-
}
|
|
1818
|
-
clear() {
|
|
1819
|
-
this.cache.clear();
|
|
1820
|
-
}
|
|
1821
|
-
key(index) {
|
|
1822
|
-
return Array.from(this.cache.keys())[index] ?? null;
|
|
1823
|
-
}
|
|
1824
|
-
async setData(key, value) {
|
|
1825
|
-
this.cache.set(key, value);
|
|
1826
|
-
}
|
|
1827
|
-
async getData(key) {
|
|
1828
|
-
return this.cache.get(key) ?? "{}";
|
|
1829
|
-
}
|
|
1830
|
-
async removeData(key) {
|
|
1831
|
-
this.cache.delete(key);
|
|
1832
|
-
}
|
|
1833
|
-
};
|
|
1834
|
-
|
|
1835
|
-
//#endregion
|
|
1836
|
-
//#region src/DefaultCrypto.ts
|
|
1837
|
-
/**
|
|
1838
|
-
* Default implementation of the Crypto interface using the 'jose' library
|
|
1839
|
-
* and the native Web Crypto API.
|
|
1652
|
+
* @example
|
|
1653
|
+
* ```typescript
|
|
1654
|
+
* const decisions: ConsentDecisions = {
|
|
1655
|
+
* approved: false,
|
|
1656
|
+
* reason: ConsentConstants.REASON_TIMEOUT,
|
|
1657
|
+
* purposes: [],
|
|
1658
|
+
* };
|
|
1659
|
+
* ```
|
|
1840
1660
|
*/
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
return new TextDecoder().decode(decodedArray);
|
|
1845
|
-
}
|
|
1846
|
-
base64URLEncode(value) {
|
|
1847
|
-
return jose.base64url.encode(value);
|
|
1848
|
-
}
|
|
1849
|
-
generateRandomBytes(length) {
|
|
1850
|
-
return crypto.getRandomValues(new Uint8Array(length));
|
|
1851
|
-
}
|
|
1852
|
-
async hashSha256(data) {
|
|
1853
|
-
const dataBuffer = new TextEncoder().encode(data);
|
|
1854
|
-
const hashBuffer = await crypto.subtle.digest("SHA-256", dataBuffer);
|
|
1855
|
-
return new Uint8Array(hashBuffer);
|
|
1856
|
-
}
|
|
1857
|
-
async verifyJwt(idToken, jwk, algorithms, clientId, issuer, subject, clockTolerance, validateJwtIssuer = true) {
|
|
1858
|
-
const key = await jose.importJWK(jwk);
|
|
1859
|
-
await jose.jwtVerify(idToken, key, {
|
|
1860
|
-
algorithms,
|
|
1861
|
-
audience: [clientId],
|
|
1862
|
-
clockTolerance,
|
|
1863
|
-
issuer: validateJwtIssuer ? issuer : void 0,
|
|
1864
|
-
subject
|
|
1865
|
-
});
|
|
1866
|
-
return true;
|
|
1867
|
-
}
|
|
1661
|
+
const ConsentConstants = {
|
|
1662
|
+
REASON_TIMEOUT: "timeout",
|
|
1663
|
+
REASON_USER_DENIED: "user_denied"
|
|
1868
1664
|
};
|
|
1665
|
+
var ConsentConstants_default = ConsentConstants;
|
|
1869
1666
|
|
|
1870
1667
|
//#endregion
|
|
1871
|
-
//#region src/
|
|
1668
|
+
//#region src/errors/ThunderIDRuntimeError.ts
|
|
1872
1669
|
/**
|
|
1873
|
-
*
|
|
1670
|
+
* Base class for all runtime errors in ThunderID. This class extends ThunderIDError
|
|
1671
|
+
* and adds support for additional error details. Use this class for errors that occur
|
|
1672
|
+
* during runtime execution that are not related to API calls.
|
|
1673
|
+
*
|
|
1674
|
+
* @example
|
|
1675
|
+
* ```typescript
|
|
1676
|
+
* throw new ThunderIDRuntimeError(
|
|
1677
|
+
* "Failed to parse configuration",
|
|
1678
|
+
* "CONFIG_PARSE_ERROR",
|
|
1679
|
+
* { invalidField: "redirectUri" }
|
|
1680
|
+
* );
|
|
1681
|
+
* ```
|
|
1874
1682
|
*/
|
|
1875
|
-
|
|
1876
|
-
/**
|
|
1877
|
-
* Store for configuration data that defines the application's behavior and settings.
|
|
1878
|
-
*/
|
|
1879
|
-
Stores$1["ConfigData"] = "config_data";
|
|
1880
|
-
/**
|
|
1881
|
-
* Store for OpenID Connect provider metadata, including endpoints and configuration.
|
|
1882
|
-
*/
|
|
1883
|
-
Stores$1["OIDCProviderMetaData"] = "oidc_provider_meta_data";
|
|
1884
|
-
/**
|
|
1885
|
-
* Store for persisted data that needs to be retained across sessions and application restarts.
|
|
1886
|
-
*/
|
|
1887
|
-
Stores$1["PersistedData"] = "persisted_data";
|
|
1888
|
-
/**
|
|
1889
|
-
* Store for user session-related data like tokens and authentication state.
|
|
1890
|
-
*/
|
|
1891
|
-
Stores$1["SessionData"] = "session_data";
|
|
1683
|
+
var ThunderIDRuntimeError = class extends ThunderIDError {
|
|
1892
1684
|
/**
|
|
1893
|
-
*
|
|
1685
|
+
* Creates an instance of ThunderIDRuntimeError.
|
|
1686
|
+
*
|
|
1687
|
+
* @param message - Human-readable description of the error
|
|
1688
|
+
* @param code - A unique error code that identifies the error type
|
|
1689
|
+
* @param details - Additional details about the error that might be helpful for debugging
|
|
1690
|
+
* @param origin - Optional. The SDK origin (e.g. 'react', 'vue'). Defaults to generic 'ThunderID'
|
|
1691
|
+
* @constructor
|
|
1894
1692
|
*/
|
|
1895
|
-
|
|
1693
|
+
constructor(message, code, origin, details) {
|
|
1694
|
+
super(message, code, origin);
|
|
1695
|
+
this.details = details;
|
|
1696
|
+
Object.defineProperty(this, "name", {
|
|
1697
|
+
configurable: true,
|
|
1698
|
+
value: "ThunderIDRuntimeError",
|
|
1699
|
+
writable: true
|
|
1700
|
+
});
|
|
1701
|
+
}
|
|
1896
1702
|
/**
|
|
1897
|
-
*
|
|
1703
|
+
* Returns a string representation of the runtime error
|
|
1704
|
+
* @returns Formatted error string with name, code, details, and message
|
|
1898
1705
|
*/
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
}({})
|
|
1706
|
+
toString() {
|
|
1707
|
+
const details = this.details ? `\nDetails: ${JSON.stringify(this.details, null, 2)}` : "";
|
|
1708
|
+
return `[${this.name}] (code="${this.code}")${details}\nMessage: ${this.message}`;
|
|
1709
|
+
}
|
|
1710
|
+
};
|
|
1902
1711
|
|
|
1903
1712
|
//#endregion
|
|
1904
|
-
//#region src/
|
|
1905
|
-
const PREFIX = "⚡ ThunderID";
|
|
1906
|
-
/**
|
|
1907
|
-
* Default logger configuration
|
|
1908
|
-
*/
|
|
1909
|
-
const DEFAULT_CONFIG$1 = {
|
|
1910
|
-
level: "info",
|
|
1911
|
-
prefix: `${PREFIX}`,
|
|
1912
|
-
showLevel: true,
|
|
1913
|
-
timestamps: true
|
|
1914
|
-
};
|
|
1915
|
-
/**
|
|
1916
|
-
* Environment detection utilities
|
|
1917
|
-
*/
|
|
1918
|
-
const isBrowser = () => typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
1919
|
-
const isNode = () => typeof process !== "undefined" && process.versions && process.versions.node;
|
|
1920
|
-
/**
|
|
1921
|
-
* Color codes for terminal output (Node.js)
|
|
1922
|
-
*/
|
|
1923
|
-
const COLORS = {
|
|
1924
|
-
blue: "\x1B[34m",
|
|
1925
|
-
bright: "\x1B[1m",
|
|
1926
|
-
cyan: "\x1B[36m",
|
|
1927
|
-
dim: "\x1B[2m",
|
|
1928
|
-
gray: "\x1B[90m",
|
|
1929
|
-
green: "\x1B[32m",
|
|
1930
|
-
magenta: "\x1B[35m",
|
|
1931
|
-
red: "\x1B[31m",
|
|
1932
|
-
reset: "\x1B[0m",
|
|
1933
|
-
white: "\x1B[37m",
|
|
1934
|
-
yellow: "\x1B[33m"
|
|
1935
|
-
};
|
|
1936
|
-
/**
|
|
1937
|
-
* Browser console styling
|
|
1938
|
-
*/
|
|
1939
|
-
const BROWSER_STYLES = {
|
|
1940
|
-
debug: "color: #6b7280; font-weight: normal;",
|
|
1941
|
-
error: "color: #dc2626; font-weight: bold;",
|
|
1942
|
-
info: "color: #2563eb; font-weight: bold;",
|
|
1943
|
-
prefix: "color: #7c3aed; font-weight: bold;",
|
|
1944
|
-
timestamp: "color: #6b7280; font-size: 0.9em;",
|
|
1945
|
-
warn: "color: #d97706; font-weight: bold;"
|
|
1946
|
-
};
|
|
1947
|
-
const LOG_LEVEL_ORDER = {
|
|
1948
|
-
debug: 0,
|
|
1949
|
-
error: 3,
|
|
1950
|
-
info: 1,
|
|
1951
|
-
warn: 2
|
|
1952
|
-
};
|
|
1713
|
+
//#region src/models/embedded-recovery-flow.ts
|
|
1953
1714
|
/**
|
|
1954
|
-
*
|
|
1715
|
+
* Status enumeration for the embedded recovery flow operations.
|
|
1716
|
+
*
|
|
1717
|
+
* @experimental Part of the new ThunderID API
|
|
1955
1718
|
*/
|
|
1956
|
-
|
|
1957
|
-
config;
|
|
1958
|
-
constructor(config = {}) {
|
|
1959
|
-
this.config = {
|
|
1960
|
-
...DEFAULT_CONFIG$1,
|
|
1961
|
-
...config
|
|
1962
|
-
};
|
|
1963
|
-
}
|
|
1964
|
-
/**
|
|
1965
|
-
* Update logger configuration
|
|
1966
|
-
*/
|
|
1967
|
-
configure(config) {
|
|
1968
|
-
this.config = {
|
|
1969
|
-
...this.config,
|
|
1970
|
-
...config
|
|
1971
|
-
};
|
|
1972
|
-
}
|
|
1719
|
+
let EmbeddedRecoveryFlowStatus = /* @__PURE__ */ function(EmbeddedRecoveryFlowStatus$1) {
|
|
1973
1720
|
/**
|
|
1974
|
-
*
|
|
1721
|
+
* Recovery flow completed successfully.
|
|
1975
1722
|
*/
|
|
1976
|
-
|
|
1977
|
-
return { ...this.config };
|
|
1978
|
-
}
|
|
1723
|
+
EmbeddedRecoveryFlowStatus$1["Complete"] = "COMPLETE";
|
|
1979
1724
|
/**
|
|
1980
|
-
*
|
|
1725
|
+
* Recovery flow encountered an error and cannot proceed.
|
|
1726
|
+
*
|
|
1727
|
+
* @see {@link EmbeddedRecoveryFlowErrorResponse} for error response structure
|
|
1981
1728
|
*/
|
|
1982
|
-
|
|
1983
|
-
return LOG_LEVEL_ORDER[level] >= LOG_LEVEL_ORDER[this.config.level];
|
|
1984
|
-
}
|
|
1729
|
+
EmbeddedRecoveryFlowStatus$1["Error"] = "ERROR";
|
|
1985
1730
|
/**
|
|
1986
|
-
*
|
|
1731
|
+
* Recovery flow requires additional user input.
|
|
1987
1732
|
*/
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1733
|
+
EmbeddedRecoveryFlowStatus$1["Incomplete"] = "INCOMPLETE";
|
|
1734
|
+
return EmbeddedRecoveryFlowStatus$1;
|
|
1735
|
+
}({});
|
|
1736
|
+
/**
|
|
1737
|
+
* Type enumeration for embedded recovery flow responses.
|
|
1738
|
+
*
|
|
1739
|
+
* @experimental Part of the new ThunderID API
|
|
1740
|
+
*/
|
|
1741
|
+
let EmbeddedRecoveryFlowType = /* @__PURE__ */ function(EmbeddedRecoveryFlowType$1) {
|
|
1991
1742
|
/**
|
|
1992
|
-
*
|
|
1743
|
+
* Response requires external redirection.
|
|
1993
1744
|
*/
|
|
1994
|
-
|
|
1995
|
-
switch (level) {
|
|
1996
|
-
case "debug": return "DEBUG";
|
|
1997
|
-
case "info": return "INFO";
|
|
1998
|
-
case "warn": return "WARN";
|
|
1999
|
-
case "error": return "ERROR";
|
|
2000
|
-
default: return "UNKNOWN";
|
|
2001
|
-
}
|
|
2002
|
-
}
|
|
1745
|
+
EmbeddedRecoveryFlowType$1["Redirection"] = "REDIRECTION";
|
|
2003
1746
|
/**
|
|
2004
|
-
*
|
|
1747
|
+
* Response contains view components for rendering.
|
|
2005
1748
|
*/
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
1749
|
+
EmbeddedRecoveryFlowType$1["View"] = "VIEW";
|
|
1750
|
+
return EmbeddedRecoveryFlowType$1;
|
|
1751
|
+
}({});
|
|
1752
|
+
|
|
1753
|
+
//#endregion
|
|
1754
|
+
//#region src/models/flow-meta.ts
|
|
1755
|
+
/**
|
|
1756
|
+
* The type of entity to retrieve flow metadata for.
|
|
1757
|
+
*
|
|
1758
|
+
* @example
|
|
1759
|
+
* ```typescript
|
|
1760
|
+
* const config: GetFlowMetaRequestConfig = {
|
|
1761
|
+
* baseUrl: 'https://localhost:8090',
|
|
1762
|
+
* type: FlowMetaType.App,
|
|
1763
|
+
* id: '60a9b38b-6eba-9f9e-55f9-267067de4680',
|
|
1764
|
+
* };
|
|
1765
|
+
* ```
|
|
1766
|
+
*
|
|
1767
|
+
* @experimental This API may change in future versions
|
|
1768
|
+
*/
|
|
1769
|
+
let FlowMetaType = /* @__PURE__ */ function(FlowMetaType$1) {
|
|
1770
|
+
/** Retrieve metadata scoped to a specific application */
|
|
1771
|
+
FlowMetaType$1["App"] = "APP";
|
|
1772
|
+
/** Retrieve metadata scoped to a specific organization unit */
|
|
1773
|
+
FlowMetaType$1["Ou"] = "OU";
|
|
1774
|
+
return FlowMetaType$1;
|
|
1775
|
+
}({});
|
|
1776
|
+
|
|
1777
|
+
//#endregion
|
|
1778
|
+
//#region src/models/flow.ts
|
|
1779
|
+
let FlowMode = /* @__PURE__ */ function(FlowMode$1) {
|
|
2033
1780
|
/**
|
|
2034
|
-
*
|
|
1781
|
+
* This mode is suitable for embedded sign-in, sign-up, etc. flows where the authentication
|
|
1782
|
+
* UIs are rendered within the application.
|
|
2035
1783
|
*/
|
|
2036
|
-
|
|
2037
|
-
if (!this.shouldLog(level)) return;
|
|
2038
|
-
if (this.config.formatter) {
|
|
2039
|
-
this.config.formatter(level, message, ...args);
|
|
2040
|
-
return;
|
|
2041
|
-
}
|
|
2042
|
-
if (isBrowser()) this.logToBrowser(level, message, ...args);
|
|
2043
|
-
else if (isNode()) this.logToNode(level, message, ...args);
|
|
2044
|
-
else console.log(message, ...args);
|
|
2045
|
-
}
|
|
1784
|
+
FlowMode$1["Embedded"] = "DIRECT";
|
|
2046
1785
|
/**
|
|
2047
|
-
*
|
|
1786
|
+
* Traditional redirect based sign-in, sign-up, etc. flows where the authentication
|
|
1787
|
+
* UIs are from a external Identity Provider (ex: ThunderID).
|
|
2048
1788
|
*/
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
1789
|
+
FlowMode$1["Redirect"] = "REDIRECTION";
|
|
1790
|
+
return FlowMode$1;
|
|
1791
|
+
}({});
|
|
1792
|
+
|
|
1793
|
+
//#endregion
|
|
1794
|
+
//#region src/models/field.ts
|
|
1795
|
+
let FieldType = /* @__PURE__ */ function(FieldType$1) {
|
|
1796
|
+
FieldType$1["Checkbox"] = "CHECKBOX";
|
|
1797
|
+
FieldType$1["Date"] = "DATE";
|
|
1798
|
+
FieldType$1["Email"] = "EMAIL";
|
|
1799
|
+
FieldType$1["Number"] = "NUMBER";
|
|
1800
|
+
FieldType$1["Otp"] = "OTP";
|
|
1801
|
+
FieldType$1["Password"] = "PASSWORD";
|
|
1802
|
+
FieldType$1["Radio"] = "RADIO";
|
|
1803
|
+
FieldType$1["Select"] = "SELECT";
|
|
1804
|
+
FieldType$1["Tel"] = "TEL";
|
|
1805
|
+
FieldType$1["Text"] = "TEXT";
|
|
1806
|
+
FieldType$1["Textarea"] = "TEXTAREA";
|
|
1807
|
+
FieldType$1["Time"] = "TIME";
|
|
1808
|
+
return FieldType$1;
|
|
1809
|
+
}({});
|
|
1810
|
+
|
|
1811
|
+
//#endregion
|
|
1812
|
+
//#region src/constants/OIDCDiscoveryConstants.ts
|
|
1813
|
+
/**
|
|
1814
|
+
* Constants related to OpenID Connect (OIDC) metadata and endpoints.
|
|
1815
|
+
* This object contains all the standard OIDC endpoints and storage keys
|
|
1816
|
+
* used throughout the application for authentication and authorization.
|
|
1817
|
+
*
|
|
1818
|
+
* @remarks
|
|
1819
|
+
* The constants are organized into two main sections:
|
|
1820
|
+
* 1. Endpoints - Contains all OIDC standard endpoint paths
|
|
1821
|
+
* 2. Storage - Contains keys used for storing OIDC-related data
|
|
1822
|
+
*
|
|
1823
|
+
* @example
|
|
1824
|
+
* ```typescript
|
|
1825
|
+
* // Using an endpoint
|
|
1826
|
+
* const authEndpoint = OIDCDiscoveryConstants.Endpoints.AUTHORIZATION;
|
|
1827
|
+
*
|
|
1828
|
+
* // Using a storage key
|
|
1829
|
+
* const tokenKey = OIDCDiscoveryConstants.Storage.StorageKeys.Endpoints.TOKEN;
|
|
1830
|
+
* ```
|
|
1831
|
+
*/
|
|
1832
|
+
const OIDCDiscoveryConstants = {
|
|
1833
|
+
Endpoints: {
|
|
1834
|
+
AUTHORIZATION: "/oauth2/authorize",
|
|
1835
|
+
END_SESSION: "/oauth2/logout",
|
|
1836
|
+
ISSUER: "/oauth2/token",
|
|
1837
|
+
JWKS: "/oauth2/jwks",
|
|
1838
|
+
REVOCATION: "/oauth2/revoke",
|
|
1839
|
+
SESSION_IFRAME: "/oidc/checksession",
|
|
1840
|
+
TOKEN: "/oauth2/token",
|
|
1841
|
+
USERINFO: "/oauth2/userinfo"
|
|
1842
|
+
},
|
|
1843
|
+
Storage: { StorageKeys: {
|
|
1844
|
+
Endpoints: {
|
|
1845
|
+
AUTHORIZATION: "authorization_endpoint",
|
|
1846
|
+
END_SESSION: "end_session_endpoint",
|
|
1847
|
+
ISSUER: "issuer",
|
|
1848
|
+
JWKS: "jwks_uri",
|
|
1849
|
+
REVOCATION: "revocation_endpoint",
|
|
1850
|
+
SESSION_IFRAME: "check_session_iframe",
|
|
1851
|
+
TOKEN: "token_endpoint",
|
|
1852
|
+
USERINFO: "userinfo_endpoint"
|
|
1853
|
+
},
|
|
1854
|
+
OPENID_PROVIDER_CONFIG_INITIATED: "op_config_initiated"
|
|
1855
|
+
} }
|
|
1856
|
+
};
|
|
1857
|
+
var OIDCDiscoveryConstants_default = OIDCDiscoveryConstants;
|
|
1858
|
+
|
|
1859
|
+
//#endregion
|
|
1860
|
+
//#region src/constants/PKCEConstants.ts
|
|
1861
|
+
/**
|
|
1862
|
+
* Constants related to Proof Key for Code Exchange (PKCE) implementation.
|
|
1863
|
+
* This object contains all the necessary constants for implementing PKCE
|
|
1864
|
+
* flow in the OAuth 2.0 authorization code grant.
|
|
1865
|
+
*
|
|
1866
|
+
* @remarks
|
|
1867
|
+
* PKCE is an extension to the authorization code flow to prevent CSRF and
|
|
1868
|
+
* authorization code injection attacks. The constants are organized into
|
|
1869
|
+
* storage-related sections for managing PKCE state.
|
|
1870
|
+
*
|
|
1871
|
+
* @example
|
|
1872
|
+
* ```typescript
|
|
1873
|
+
* // Using storage keys
|
|
1874
|
+
* const codeVerifierKey = PKCEConstants.Storage.StorageKeys.CODE_VERIFIER;
|
|
1875
|
+
* const separator = PKCEConstants.Storage.StorageKeys.SEPARATOR;
|
|
1876
|
+
* ```
|
|
1877
|
+
*/
|
|
1878
|
+
const PKCEConstants = {
|
|
1879
|
+
DEFAULT_CODE_CHALLENGE_METHOD: "S256",
|
|
1880
|
+
Storage: { StorageKeys: {
|
|
1881
|
+
CODE_VERIFIER: "pkce_code_verifier",
|
|
1882
|
+
SEPARATOR: "#"
|
|
1883
|
+
} }
|
|
1884
|
+
};
|
|
1885
|
+
var PKCEConstants_default = PKCEConstants;
|
|
1886
|
+
|
|
1887
|
+
//#endregion
|
|
1888
|
+
//#region src/DefaultCacheStore.ts
|
|
1889
|
+
var DefaultCacheStore = class {
|
|
1890
|
+
cache;
|
|
1891
|
+
constructor() {
|
|
1892
|
+
this.cache = /* @__PURE__ */ new Map();
|
|
2097
1893
|
}
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
*/
|
|
2101
|
-
logToNode(level, message, ...args) {
|
|
2102
|
-
const formattedMessage = this.formatForNode(level, message);
|
|
2103
|
-
switch (level) {
|
|
2104
|
-
case "debug":
|
|
2105
|
-
console.debug(formattedMessage, ...args);
|
|
2106
|
-
break;
|
|
2107
|
-
case "info":
|
|
2108
|
-
console.info(formattedMessage, ...args);
|
|
2109
|
-
break;
|
|
2110
|
-
case "warn":
|
|
2111
|
-
console.warn(formattedMessage, ...args);
|
|
2112
|
-
break;
|
|
2113
|
-
case "error":
|
|
2114
|
-
console.error(formattedMessage, ...args);
|
|
2115
|
-
break;
|
|
2116
|
-
default: console.log(formattedMessage, ...args);
|
|
2117
|
-
}
|
|
1894
|
+
get length() {
|
|
1895
|
+
return this.cache.size;
|
|
2118
1896
|
}
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
this.
|
|
1897
|
+
getItem(key) {
|
|
1898
|
+
return this.cache.get(key) ?? null;
|
|
1899
|
+
}
|
|
1900
|
+
setItem(key, value) {
|
|
1901
|
+
this.cache.set(key, value);
|
|
1902
|
+
}
|
|
1903
|
+
removeItem(key) {
|
|
1904
|
+
this.cache.delete(key);
|
|
1905
|
+
}
|
|
1906
|
+
clear() {
|
|
1907
|
+
this.cache.clear();
|
|
1908
|
+
}
|
|
1909
|
+
key(index) {
|
|
1910
|
+
return Array.from(this.cache.keys())[index] ?? null;
|
|
1911
|
+
}
|
|
1912
|
+
async setData(key, value) {
|
|
1913
|
+
this.cache.set(key, value);
|
|
1914
|
+
}
|
|
1915
|
+
async getData(key) {
|
|
1916
|
+
return this.cache.get(key) ?? "{}";
|
|
1917
|
+
}
|
|
1918
|
+
async removeData(key) {
|
|
1919
|
+
this.cache.delete(key);
|
|
1920
|
+
}
|
|
1921
|
+
};
|
|
1922
|
+
|
|
1923
|
+
//#endregion
|
|
1924
|
+
//#region src/DefaultCrypto.ts
|
|
1925
|
+
/**
|
|
1926
|
+
* Default implementation of the Crypto interface using the 'jose' library
|
|
1927
|
+
* and the native Web Crypto API.
|
|
1928
|
+
*/
|
|
1929
|
+
var DefaultCrypto = class {
|
|
1930
|
+
base64URLDecode(value) {
|
|
1931
|
+
const decodedArray = jose.base64url.decode(value);
|
|
1932
|
+
return new TextDecoder().decode(decodedArray);
|
|
1933
|
+
}
|
|
1934
|
+
base64URLEncode(value) {
|
|
1935
|
+
return jose.base64url.encode(value);
|
|
1936
|
+
}
|
|
1937
|
+
generateRandomBytes(length) {
|
|
1938
|
+
return crypto.getRandomValues(new Uint8Array(length));
|
|
1939
|
+
}
|
|
1940
|
+
async hashSha256(data) {
|
|
1941
|
+
const dataBuffer = new TextEncoder().encode(data);
|
|
1942
|
+
const hashBuffer = await crypto.subtle.digest("SHA-256", dataBuffer);
|
|
1943
|
+
return new Uint8Array(hashBuffer);
|
|
1944
|
+
}
|
|
1945
|
+
async verifyJwt(idToken, jwk, algorithms, clientId, issuer, subject, clockTolerance, validateJwtIssuer = true) {
|
|
1946
|
+
const key = await jose.importJWK(jwk);
|
|
1947
|
+
await jose.jwtVerify(idToken, key, {
|
|
1948
|
+
algorithms,
|
|
1949
|
+
audience: [clientId],
|
|
1950
|
+
clockTolerance,
|
|
1951
|
+
issuer: validateJwtIssuer ? issuer : void 0,
|
|
1952
|
+
subject
|
|
1953
|
+
});
|
|
1954
|
+
return true;
|
|
2124
1955
|
}
|
|
1956
|
+
};
|
|
1957
|
+
|
|
1958
|
+
//#endregion
|
|
1959
|
+
//#region src/models/store.ts
|
|
1960
|
+
/**
|
|
1961
|
+
* Enum representing different types of data stores used in the application.
|
|
1962
|
+
*/
|
|
1963
|
+
let Stores = /* @__PURE__ */ function(Stores$1) {
|
|
2125
1964
|
/**
|
|
2126
|
-
*
|
|
1965
|
+
* Store for configuration data that defines the application's behavior and settings.
|
|
2127
1966
|
*/
|
|
2128
|
-
|
|
2129
|
-
this.logMessage("info", message, ...args);
|
|
2130
|
-
}
|
|
1967
|
+
Stores$1["ConfigData"] = "config_data";
|
|
2131
1968
|
/**
|
|
2132
|
-
*
|
|
1969
|
+
* Store for OpenID Connect provider metadata, including endpoints and configuration.
|
|
2133
1970
|
*/
|
|
2134
|
-
|
|
2135
|
-
this.logMessage("warn", message, ...args);
|
|
2136
|
-
}
|
|
1971
|
+
Stores$1["OIDCProviderMetaData"] = "oidc_provider_meta_data";
|
|
2137
1972
|
/**
|
|
2138
|
-
*
|
|
1973
|
+
* Store for persisted data that needs to be retained across sessions and application restarts.
|
|
2139
1974
|
*/
|
|
2140
|
-
|
|
2141
|
-
this.logMessage("error", message, ...args);
|
|
2142
|
-
}
|
|
1975
|
+
Stores$1["PersistedData"] = "persisted_data";
|
|
2143
1976
|
/**
|
|
2144
|
-
*
|
|
1977
|
+
* Store for user session-related data like tokens and authentication state.
|
|
2145
1978
|
*/
|
|
2146
|
-
|
|
2147
|
-
const childPrefix = this.config.prefix ? `${this.config.prefix} - ${prefix}` : prefix;
|
|
2148
|
-
return new Logger({
|
|
2149
|
-
...this.config,
|
|
2150
|
-
prefix: childPrefix
|
|
2151
|
-
});
|
|
2152
|
-
}
|
|
1979
|
+
Stores$1["SessionData"] = "session_data";
|
|
2153
1980
|
/**
|
|
2154
|
-
*
|
|
1981
|
+
* Store for temporary data that needs to persist only for a short duration.
|
|
2155
1982
|
*/
|
|
2156
|
-
|
|
2157
|
-
this.config.level = level;
|
|
2158
|
-
}
|
|
1983
|
+
Stores$1["TemporaryData"] = "temporary_data";
|
|
2159
1984
|
/**
|
|
2160
|
-
*
|
|
1985
|
+
* Store for data that leverages local storage if available, falling back to the configured storage.
|
|
2161
1986
|
*/
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
};
|
|
2166
|
-
/**
|
|
2167
|
-
* Default logger instance
|
|
2168
|
-
*/
|
|
2169
|
-
const logger = new Logger();
|
|
2170
|
-
/**
|
|
2171
|
-
* Create a new logger instance with custom configuration
|
|
2172
|
-
*/
|
|
2173
|
-
const createLogger = (config) => new Logger(config);
|
|
2174
|
-
/**
|
|
2175
|
-
* Default export - global logger instance
|
|
2176
|
-
*/
|
|
2177
|
-
var logger_default = logger;
|
|
2178
|
-
/**
|
|
2179
|
-
* Named exports for convenience
|
|
2180
|
-
*/
|
|
2181
|
-
const debug = (message, ...args) => logger.debug(message, ...args);
|
|
2182
|
-
const info = (message, ...args) => logger.info(message, ...args);
|
|
2183
|
-
const warn = (message, ...args) => logger.warn(message, ...args);
|
|
2184
|
-
const error = (message, ...args) => logger.error(message, ...args);
|
|
2185
|
-
/**
|
|
2186
|
-
* Configure the default logger
|
|
2187
|
-
*/
|
|
2188
|
-
const configure = (config) => logger.configure(config);
|
|
2189
|
-
/**
|
|
2190
|
-
* Create component-specific loggers
|
|
2191
|
-
*/
|
|
2192
|
-
const createComponentLogger = (component) => logger.child(component);
|
|
2193
|
-
/**
|
|
2194
|
-
* Create package-specific logger
|
|
2195
|
-
*/
|
|
2196
|
-
const createPackageLogger = (packageName) => createLogger({
|
|
2197
|
-
level: "info",
|
|
2198
|
-
prefix: `${PREFIX} - ${packageName}`,
|
|
2199
|
-
showLevel: true,
|
|
2200
|
-
timestamps: true
|
|
2201
|
-
});
|
|
2202
|
-
/**
|
|
2203
|
-
* Create package component logger (package + component)
|
|
2204
|
-
*/
|
|
2205
|
-
const createPackageComponentLogger = (packageName, component) => {
|
|
2206
|
-
return createPackageLogger(packageName).child(component);
|
|
2207
|
-
};
|
|
1987
|
+
Stores$1["HybridData"] = "hybrid_data";
|
|
1988
|
+
return Stores$1;
|
|
1989
|
+
}({});
|
|
2208
1990
|
|
|
2209
1991
|
//#endregion
|
|
2210
1992
|
//#region src/StorageManager.ts
|
|
@@ -2565,23 +2347,6 @@ var resolveResourceEndpoint_default = resolveResourceEndpoint;
|
|
|
2565
2347
|
//#endregion
|
|
2566
2348
|
//#region src/constants/TokenExchangeConstants.ts
|
|
2567
2349
|
/**
|
|
2568
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
2569
|
-
*
|
|
2570
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
2571
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
2572
|
-
* in compliance with the License.
|
|
2573
|
-
* You may obtain a copy of the License at
|
|
2574
|
-
*
|
|
2575
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2576
|
-
*
|
|
2577
|
-
* Unless required by applicable law or agreed to in writing,
|
|
2578
|
-
* software distributed under the License is distributed on an
|
|
2579
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
2580
|
-
* KIND, either express or implied. See the License for the
|
|
2581
|
-
* specific language governing permissions and limitations
|
|
2582
|
-
* under the License.
|
|
2583
|
-
*/
|
|
2584
|
-
/**
|
|
2585
2350
|
* Constants for OAuth 2.0 Token Exchange operations.
|
|
2586
2351
|
* This object contains placeholders used in token exchange requests
|
|
2587
2352
|
* and responses for dynamic value substitution.
|
|
@@ -2856,23 +2621,6 @@ var base64Encode_default = base64Encode;
|
|
|
2856
2621
|
//#endregion
|
|
2857
2622
|
//#region src/utils/deepMerge.ts
|
|
2858
2623
|
/**
|
|
2859
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
2860
|
-
*
|
|
2861
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
2862
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
2863
|
-
* in compliance with the License.
|
|
2864
|
-
* You may obtain a copy of the License at
|
|
2865
|
-
*
|
|
2866
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2867
|
-
*
|
|
2868
|
-
* Unless required by applicable law or agreed to in writing,
|
|
2869
|
-
* software distributed under the License is distributed on an
|
|
2870
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
2871
|
-
* KIND, either express or implied. See the License for the
|
|
2872
|
-
* specific language governing permissions and limitations
|
|
2873
|
-
* under the License.
|
|
2874
|
-
*/
|
|
2875
|
-
/**
|
|
2876
2624
|
* Checks if a value is a plain object (not an array, function, date, etc.)
|
|
2877
2625
|
*
|
|
2878
2626
|
* @param value - The value to check
|
|
@@ -4096,23 +3844,6 @@ var createTheme_default = createTheme;
|
|
|
4096
3844
|
//#endregion
|
|
4097
3845
|
//#region src/utils/arrayBufferToBase64url.ts
|
|
4098
3846
|
/**
|
|
4099
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
4100
|
-
*
|
|
4101
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
4102
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
4103
|
-
* in compliance with the License.
|
|
4104
|
-
* You may obtain a copy of the License at
|
|
4105
|
-
*
|
|
4106
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4107
|
-
*
|
|
4108
|
-
* Unless required by applicable law or agreed to in writing,
|
|
4109
|
-
* software distributed under the License is distributed on an
|
|
4110
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
4111
|
-
* KIND, either express or implied. See the License for the
|
|
4112
|
-
* specific language governing permissions and limitations
|
|
4113
|
-
* under the License.
|
|
4114
|
-
*/
|
|
4115
|
-
/**
|
|
4116
3847
|
* Converts an ArrayBuffer to a base64url encoded string.
|
|
4117
3848
|
*
|
|
4118
3849
|
* Base64url encoding is a URL-safe variant of base64 encoding that:
|
|
@@ -4152,23 +3883,6 @@ var arrayBufferToBase64url_default = arrayBufferToBase64url;
|
|
|
4152
3883
|
//#endregion
|
|
4153
3884
|
//#region src/utils/base64urlToArrayBuffer.ts
|
|
4154
3885
|
/**
|
|
4155
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
4156
|
-
*
|
|
4157
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
4158
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
4159
|
-
* in compliance with the License.
|
|
4160
|
-
* You may obtain a copy of the License at
|
|
4161
|
-
*
|
|
4162
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4163
|
-
*
|
|
4164
|
-
* Unless required by applicable law or agreed to in writing,
|
|
4165
|
-
* software distributed under the License is distributed on an
|
|
4166
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
4167
|
-
* KIND, either express or implied. See the License for the
|
|
4168
|
-
* specific language governing permissions and limitations
|
|
4169
|
-
* under the License.
|
|
4170
|
-
*/
|
|
4171
|
-
/**
|
|
4172
3886
|
* Converts a base64url encoded string back to an ArrayBuffer.
|
|
4173
3887
|
*
|
|
4174
3888
|
* This function performs the inverse operation of base64url encoding by:
|
|
@@ -4217,23 +3931,6 @@ var base64urlToArrayBuffer_default = base64urlToArrayBuffer;
|
|
|
4217
3931
|
//#endregion
|
|
4218
3932
|
//#region src/utils/bem.ts
|
|
4219
3933
|
/**
|
|
4220
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
4221
|
-
*
|
|
4222
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
4223
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
4224
|
-
* in compliance with the License.
|
|
4225
|
-
* You may obtain a copy of the License at
|
|
4226
|
-
*
|
|
4227
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4228
|
-
*
|
|
4229
|
-
* Unless required by applicable law or agreed to in writing,
|
|
4230
|
-
* software distributed under the License is distributed on an
|
|
4231
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
4232
|
-
* KIND, either express or implied. See the License for the
|
|
4233
|
-
* specific language governing permissions and limitations
|
|
4234
|
-
* under the License.
|
|
4235
|
-
*/
|
|
4236
|
-
/**
|
|
4237
3934
|
* Creates a BEM-style class name by combining a base class with element and/or modifier
|
|
4238
3935
|
*
|
|
4239
3936
|
* @param baseClass - The base CSS class string (usually from emotion's css function)
|
|
@@ -4271,23 +3968,6 @@ var bem_default = bem;
|
|
|
4271
3968
|
//#endregion
|
|
4272
3969
|
//#region src/utils/formatDate.ts
|
|
4273
3970
|
/**
|
|
4274
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
4275
|
-
*
|
|
4276
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
4277
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
4278
|
-
* in compliance with the License.
|
|
4279
|
-
* You may obtain a copy of the License at
|
|
4280
|
-
*
|
|
4281
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4282
|
-
*
|
|
4283
|
-
* Unless required by applicable law or agreed to in writing,
|
|
4284
|
-
* software distributed under the License is distributed on an
|
|
4285
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
4286
|
-
* KIND, either express or implied. See the License for the
|
|
4287
|
-
* specific language governing permissions and limitations
|
|
4288
|
-
* under the License.
|
|
4289
|
-
*/
|
|
4290
|
-
/**
|
|
4291
3971
|
* Formats a date string to a human-readable format.
|
|
4292
3972
|
*
|
|
4293
3973
|
* @param dateString - The date string to format (optional)
|
|
@@ -4438,23 +4118,6 @@ var getRedirectBasedSignUpUrl_default = getRedirectBasedSignUpUrl;
|
|
|
4438
4118
|
//#endregion
|
|
4439
4119
|
//#region src/utils/isEmpty.ts
|
|
4440
4120
|
/**
|
|
4441
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
4442
|
-
*
|
|
4443
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
4444
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
4445
|
-
* in compliance with the License.
|
|
4446
|
-
* You may obtain a copy of the License at
|
|
4447
|
-
*
|
|
4448
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4449
|
-
*
|
|
4450
|
-
* Unless required by applicable law or agreed to in writing,
|
|
4451
|
-
* software distributed under the License is distributed on an
|
|
4452
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
4453
|
-
* KIND, either express or implied. See the License for the
|
|
4454
|
-
* specific language governing permissions and limitations
|
|
4455
|
-
* under the License.
|
|
4456
|
-
*/
|
|
4457
|
-
/**
|
|
4458
4121
|
* Checks if a value is considered empty.
|
|
4459
4122
|
*
|
|
4460
4123
|
* A value is considered empty if it is:
|
|
@@ -4494,23 +4157,6 @@ var isEmpty_default = isEmpty;
|
|
|
4494
4157
|
|
|
4495
4158
|
//#endregion
|
|
4496
4159
|
//#region src/utils/isEmojiUri.ts
|
|
4497
|
-
/**
|
|
4498
|
-
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
|
|
4499
|
-
*
|
|
4500
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
4501
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
4502
|
-
* in compliance with the License.
|
|
4503
|
-
* You may obtain a copy of the License at
|
|
4504
|
-
*
|
|
4505
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4506
|
-
*
|
|
4507
|
-
* Unless required by applicable law or agreed to in writing,
|
|
4508
|
-
* software distributed under the License is distributed on an
|
|
4509
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
4510
|
-
* KIND, either express or implied. See the License for the
|
|
4511
|
-
* specific language governing permissions and limitations
|
|
4512
|
-
* under the License.
|
|
4513
|
-
*/
|
|
4514
4160
|
const EMOJI_URI_SCHEME = "emoji:";
|
|
4515
4161
|
/**
|
|
4516
4162
|
* Checks whether a given URI uses the `emoji:` scheme (e.g. `"emoji:🐯"`).
|
|
@@ -4551,23 +4197,6 @@ var extractEmojiFromUri_default = extractEmojiFromUri;
|
|
|
4551
4197
|
//#endregion
|
|
4552
4198
|
//#region src/utils/set.ts
|
|
4553
4199
|
/**
|
|
4554
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
4555
|
-
*
|
|
4556
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
4557
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
4558
|
-
* in compliance with the License.
|
|
4559
|
-
* You may obtain a copy of the License at
|
|
4560
|
-
*
|
|
4561
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4562
|
-
*
|
|
4563
|
-
* Unless required by applicable law or agreed to in writing,
|
|
4564
|
-
* software distributed under the License is distributed on an
|
|
4565
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
4566
|
-
* KIND, either express or implied. See the License for the
|
|
4567
|
-
* specific language governing permissions and limitations
|
|
4568
|
-
* under the License.
|
|
4569
|
-
*/
|
|
4570
|
-
/**
|
|
4571
4200
|
* Sets the value at path of object. If a portion of path doesn't exist,
|
|
4572
4201
|
* it's created. Arrays are created for missing index properties while
|
|
4573
4202
|
* objects are created for all other missing properties.
|
|
@@ -4597,23 +4226,6 @@ var set_default = set;
|
|
|
4597
4226
|
//#endregion
|
|
4598
4227
|
//#region src/utils/get.ts
|
|
4599
4228
|
/**
|
|
4600
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
4601
|
-
*
|
|
4602
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
4603
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
4604
|
-
* in compliance with the License.
|
|
4605
|
-
* You may obtain a copy of the License at
|
|
4606
|
-
*
|
|
4607
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4608
|
-
*
|
|
4609
|
-
* Unless required by applicable law or agreed to in writing,
|
|
4610
|
-
* software distributed under the License is distributed on an
|
|
4611
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
4612
|
-
* KIND, either express or implied. See the License for the
|
|
4613
|
-
* specific language governing permissions and limitations
|
|
4614
|
-
* under the License.
|
|
4615
|
-
*/
|
|
4616
|
-
/**
|
|
4617
4229
|
* Gets the value at path of object. If the resolved value is undefined,
|
|
4618
4230
|
* the defaultValue is returned in its place.
|
|
4619
4231
|
* Similar to Lodash's get() function
|
|
@@ -4633,23 +4245,6 @@ var get_default = get;
|
|
|
4633
4245
|
//#endregion
|
|
4634
4246
|
//#region src/utils/startCase.ts
|
|
4635
4247
|
/**
|
|
4636
|
-
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
|
|
4637
|
-
*
|
|
4638
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
4639
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
4640
|
-
* in compliance with the License.
|
|
4641
|
-
* You may obtain a copy of the License at
|
|
4642
|
-
*
|
|
4643
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4644
|
-
*
|
|
4645
|
-
* Unless required by applicable law or agreed to in writing,
|
|
4646
|
-
* software distributed under the License is distributed on an
|
|
4647
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
4648
|
-
* KIND, either express or implied. See the License for the
|
|
4649
|
-
* specific language governing permissions and limitations
|
|
4650
|
-
* under the License.
|
|
4651
|
-
*/
|
|
4652
|
-
/**
|
|
4653
4248
|
* Converts the first character of `string` to upper case.
|
|
4654
4249
|
*
|
|
4655
4250
|
* @param string - The string to convert.
|
|
@@ -4674,23 +4269,6 @@ var startCase_default = startCase;
|
|
|
4674
4269
|
//#endregion
|
|
4675
4270
|
//#region src/utils/removeTrailingSlash.ts
|
|
4676
4271
|
/**
|
|
4677
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
4678
|
-
*
|
|
4679
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
4680
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
4681
|
-
* in compliance with the License.
|
|
4682
|
-
* You may obtain a copy of the License at
|
|
4683
|
-
*
|
|
4684
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4685
|
-
*
|
|
4686
|
-
* Unless required by applicable law or agreed to in writing,
|
|
4687
|
-
* software distributed under the License is distributed on an
|
|
4688
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
4689
|
-
* KIND, either express or implied. See the License for the
|
|
4690
|
-
* specific language governing permissions and limitations
|
|
4691
|
-
* under the License.
|
|
4692
|
-
*/
|
|
4693
|
-
/**
|
|
4694
4272
|
* Removes a trailing slash from a path string if it exists.
|
|
4695
4273
|
*
|
|
4696
4274
|
* @param path - The string path to process
|
|
@@ -4743,23 +4321,6 @@ function resolveMeta(path, meta) {
|
|
|
4743
4321
|
//#endregion
|
|
4744
4322
|
//#region src/utils/parseFlowTemplateLiteral.ts
|
|
4745
4323
|
/**
|
|
4746
|
-
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
|
|
4747
|
-
*
|
|
4748
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
4749
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
4750
|
-
* in compliance with the License.
|
|
4751
|
-
* You may obtain a copy of the License at
|
|
4752
|
-
*
|
|
4753
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4754
|
-
*
|
|
4755
|
-
* Unless required by applicable law or agreed to in writing,
|
|
4756
|
-
* software distributed under the License is distributed on an
|
|
4757
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
4758
|
-
* KIND, either express or implied. See the License for the
|
|
4759
|
-
* specific language governing permissions and limitations
|
|
4760
|
-
* under the License.
|
|
4761
|
-
*/
|
|
4762
|
-
/**
|
|
4763
4324
|
* Regular expression to detect a flow template literal wrapped in double braces.
|
|
4764
4325
|
* Matches patterns like `{{ t(key) }}`, `{{ meta(key) }}`, etc.
|
|
4765
4326
|
*
|
|
@@ -4876,23 +4437,6 @@ function resolveFlowTemplateLiterals(text, { t, meta }) {
|
|
|
4876
4437
|
//#endregion
|
|
4877
4438
|
//#region src/utils/countryCodeToFlagEmoji.ts
|
|
4878
4439
|
/**
|
|
4879
|
-
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
|
|
4880
|
-
*
|
|
4881
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
4882
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
4883
|
-
* in compliance with the License.
|
|
4884
|
-
* You may obtain a copy of the License at
|
|
4885
|
-
*
|
|
4886
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4887
|
-
*
|
|
4888
|
-
* Unless required by applicable law or agreed to in writing,
|
|
4889
|
-
* software distributed under the License is distributed on an
|
|
4890
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
4891
|
-
* KIND, either express or implied. See the License for the
|
|
4892
|
-
* specific language governing permissions and limitations
|
|
4893
|
-
* under the License.
|
|
4894
|
-
*/
|
|
4895
|
-
/**
|
|
4896
4440
|
* Converts a two-letter ISO 3166-1 alpha-2 country code to a flag emoji using
|
|
4897
4441
|
* Unicode Regional Indicator Symbols (U+1F1E6–U+1F1FF).
|
|
4898
4442
|
*
|
|
@@ -4906,23 +4450,6 @@ function countryCodeToFlagEmoji(countryCode) {
|
|
|
4906
4450
|
//#endregion
|
|
4907
4451
|
//#region src/utils/resolveLocaleDisplayName.ts
|
|
4908
4452
|
/**
|
|
4909
|
-
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
|
|
4910
|
-
*
|
|
4911
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
4912
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
4913
|
-
* in compliance with the License.
|
|
4914
|
-
* You may obtain a copy of the License at
|
|
4915
|
-
*
|
|
4916
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4917
|
-
*
|
|
4918
|
-
* Unless required by applicable law or agreed to in writing,
|
|
4919
|
-
* software distributed under the License is distributed on an
|
|
4920
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
4921
|
-
* KIND, either express or implied. See the License for the
|
|
4922
|
-
* specific language governing permissions and limitations
|
|
4923
|
-
* under the License.
|
|
4924
|
-
*/
|
|
4925
|
-
/**
|
|
4926
4453
|
* Resolves a BCP 47 locale tag to a human-readable display name using the
|
|
4927
4454
|
* `Intl.DisplayNames` API.
|
|
4928
4455
|
*
|
|
@@ -5094,7 +4621,7 @@ var buildValidatorFromRules_default = buildValidatorFromRules;
|
|
|
5094
4621
|
* ```typescript
|
|
5095
4622
|
* // Usage with clsx
|
|
5096
4623
|
* clsx(withVendorCSSClassPrefix('sign-in-button'), className)
|
|
5097
|
-
* // Result: "
|
|
4624
|
+
* // Result: "thunderid-sign-in-button"
|
|
5098
4625
|
* ```
|
|
5099
4626
|
*/
|
|
5100
4627
|
const withVendorCSSClassPrefix = (className) => `${VendorConstants_default.VENDOR_PREFIX}-${className}`;
|
|
@@ -6202,4 +5729,4 @@ const normalizeTranslations = (translations) => {
|
|
|
6202
5729
|
var normalizeTranslations_default = normalizeTranslations;
|
|
6203
5730
|
|
|
6204
5731
|
//#endregion
|
|
6205
|
-
export { ApplicationNativeAuthenticationConstants_default as ApplicationNativeAuthenticationConstants, AuthenticationHelper_default as AuthenticationHelper, DEFAULT_THEME, DEFAULT_VALIDATION_MESSAGE_KEYS, EMOJI_URI_SCHEME, EmbeddedFlowActionVariant, EmbeddedFlowComponentType, EmbeddedFlowEventType, EmbeddedFlowResponseType, EmbeddedFlowTextVariant, EmbeddedFlowType, EmbeddedRecoveryFlowStatus, EmbeddedRecoveryFlowType, EmbeddedSignInFlowStatus, EmbeddedSignInFlowType, EmbeddedSignUpFlowStatus, EmbeddedSignUpFlowType, FieldType, FlowMetaType, FlowMode, HttpClient, IsomorphicCrypto, OIDCRequestConstants_default as OIDCRequestConstants, StorageManager_default as StorageManager, ThunderIDAPIError, ThunderIDAuthException, ThunderIDError, ThunderIDJavaScriptClient_default as ThunderIDJavaScriptClient, ThunderIDRuntimeError, TokenConstants_default as TokenConstants, TranslationBundleConstants_default as TranslationBundleConstants, VendorConstants_default as VendorConstants, arrayBufferToBase64url_default as arrayBufferToBase64url, base64urlToArrayBuffer_default as base64urlToArrayBuffer, bem_default as bem, buildValidatorFromRules_default as buildValidatorFromRules, configure as configureLogger, countryCodeToFlagEmoji, createComponentLogger, createLogger, createPackageComponentLogger, createPackageLogger, createTheme_default as createTheme, debug, deepMerge_default as deepMerge, error, evaluateValidationRule_default as evaluateValidationRule, executeEmbeddedRecoveryFlow_default as executeEmbeddedRecoveryFlow, executeEmbeddedSignInFlow_default as executeEmbeddedSignInFlow, executeEmbeddedSignUpFlow_default as executeEmbeddedSignUpFlow, executeEmbeddedUserOnboardingFlow_default as executeEmbeddedUserOnboardingFlow, extractEmojiFromUri_default as extractEmojiFromUri, extractPkceStorageKeyFromState_default as extractPkceStorageKeyFromState, extractUserClaimsFromIdToken_default as extractUserClaimsFromIdToken, formatDate_default as formatDate, generateFlattenedUserProfile_default as generateFlattenedUserProfile, get_default as get, getDefaultI18nBundles_default as getDefaultI18nBundles, getFlowMeta_default as getFlowMeta, getLatestStateParam_default as getLatestStateParam, getOrganizationUnitChildren_default as getOrganizationUnitChildren, getRedirectBasedSignUpUrl_default as getRedirectBasedSignUpUrl, getUserInfo_default as getUserInfo, getUsersMe_default as getUsersMe, getVendorPrefix_default as getVendorPrefix, info, isEmojiUri_default as isEmojiUri, isEmpty_default as isEmpty, isRecognizedBaseUrlPattern_default as isRecognizedBaseUrlPattern, logger_default as logger, normalizeTranslations_default as normalizeTranslations, processOpenIDScopes_default as processOpenIDScopes, processUsername_default as processUsername, removeTrailingSlash_default as removeTrailingSlash, resolveFieldName_default as resolveFieldName, resolveFlowTemplateLiterals, resolveLocaleDisplayName, resolveLocaleEmoji_default as resolveLocaleEmoji, resolveMeta, resolveResourceEndpoint_default as resolveResourceEndpoint, set_default as set, startCase_default as startCase, updateMeProfile_default as updateMeProfile, warn, withVendorCSSClassPrefix_default as withVendorCSSClassPrefix };
|
|
5732
|
+
export { ApplicationNativeAuthenticationConstants_default as ApplicationNativeAuthenticationConstants, AuthenticationHelper_default as AuthenticationHelper, ConsentConstants_default as ConsentConstants, DEFAULT_THEME, DEFAULT_VALIDATION_MESSAGE_KEYS, EMOJI_URI_SCHEME, EmbeddedFlowActionVariant, EmbeddedFlowComponentType, EmbeddedFlowEventType, EmbeddedFlowResponseType, EmbeddedFlowTextVariant, EmbeddedFlowType, EmbeddedRecoveryFlowStatus, EmbeddedRecoveryFlowType, EmbeddedSignInFlowStatus, EmbeddedSignInFlowType, EmbeddedSignUpFlowStatus, EmbeddedSignUpFlowType, FieldType, FlowMetaType, FlowMode, HttpClient, IsomorphicCrypto, OIDCRequestConstants_default as OIDCRequestConstants, StorageManager_default as StorageManager, ThunderIDAPIError, ThunderIDAuthException, ThunderIDError, ThunderIDJavaScriptClient_default as ThunderIDJavaScriptClient, ThunderIDRuntimeError, TokenConstants_default as TokenConstants, TranslationBundleConstants_default as TranslationBundleConstants, VendorConstants_default as VendorConstants, arrayBufferToBase64url_default as arrayBufferToBase64url, base64urlToArrayBuffer_default as base64urlToArrayBuffer, bem_default as bem, buildValidatorFromRules_default as buildValidatorFromRules, configure as configureLogger, countryCodeToFlagEmoji, createComponentLogger, createLogger, createPackageComponentLogger, createPackageLogger, createTheme_default as createTheme, debug, deepMerge_default as deepMerge, error, evaluateValidationRule_default as evaluateValidationRule, executeEmbeddedRecoveryFlow_default as executeEmbeddedRecoveryFlow, executeEmbeddedSignInFlow_default as executeEmbeddedSignInFlow, executeEmbeddedSignUpFlow_default as executeEmbeddedSignUpFlow, executeEmbeddedUserOnboardingFlow_default as executeEmbeddedUserOnboardingFlow, extractEmojiFromUri_default as extractEmojiFromUri, extractPkceStorageKeyFromState_default as extractPkceStorageKeyFromState, extractUserClaimsFromIdToken_default as extractUserClaimsFromIdToken, formatDate_default as formatDate, generateFlattenedUserProfile_default as generateFlattenedUserProfile, get_default as get, getDefaultI18nBundles_default as getDefaultI18nBundles, getFlowMeta_default as getFlowMeta, getLatestStateParam_default as getLatestStateParam, getOrganizationUnitChildren_default as getOrganizationUnitChildren, getRedirectBasedSignUpUrl_default as getRedirectBasedSignUpUrl, getUserInfo_default as getUserInfo, getUsersMe_default as getUsersMe, getVendorPrefix_default as getVendorPrefix, info, isEmojiUri_default as isEmojiUri, isEmpty_default as isEmpty, isRecognizedBaseUrlPattern_default as isRecognizedBaseUrlPattern, logger_default as logger, normalizeTranslations_default as normalizeTranslations, processOpenIDScopes_default as processOpenIDScopes, processUsername_default as processUsername, removeTrailingSlash_default as removeTrailingSlash, resolveFieldName_default as resolveFieldName, resolveFlowTemplateLiterals, resolveLocaleDisplayName, resolveLocaleEmoji_default as resolveLocaleEmoji, resolveMeta, resolveResourceEndpoint_default as resolveResourceEndpoint, set_default as set, startCase_default as startCase, updateMeProfile_default as updateMeProfile, warn, withVendorCSSClassPrefix_default as withVendorCSSClassPrefix };
|