@asgardeo/javascript 0.2.10 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +8 -2
- package/dist/cjs/index.js.map +2 -2
- package/dist/index.js +8 -2
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -3007,7 +3007,10 @@ var executeEmbeddedSignInFlowV2 = async ({
|
|
|
3007
3007
|
);
|
|
3008
3008
|
}
|
|
3009
3009
|
let endpoint = url ?? `${baseUrl}/flow/execute`;
|
|
3010
|
-
const
|
|
3010
|
+
const cleanPayload = typeof payload === "object" && payload !== null ? Object.fromEntries(Object.entries(payload).filter(([key]) => key !== "verbose")) : payload;
|
|
3011
|
+
const hasOnlyAppIdAndFlowType = typeof cleanPayload === "object" && cleanPayload !== null && "applicationId" in cleanPayload && "flowType" in cleanPayload && Object.keys(cleanPayload).length === 2;
|
|
3012
|
+
const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "flowId" in cleanPayload && Object.keys(cleanPayload).length === 1;
|
|
3013
|
+
const requestPayload = hasOnlyAppIdAndFlowType || hasOnlyFlowId ? { ...cleanPayload, verbose: true } : cleanPayload;
|
|
3011
3014
|
const response = await fetch(endpoint, {
|
|
3012
3015
|
...requestConfig,
|
|
3013
3016
|
method: requestConfig.method || "POST",
|
|
@@ -3104,7 +3107,10 @@ var executeEmbeddedSignUpFlowV2 = async ({
|
|
|
3104
3107
|
);
|
|
3105
3108
|
}
|
|
3106
3109
|
let endpoint = url ?? `${baseUrl}/flow/execute`;
|
|
3107
|
-
const
|
|
3110
|
+
const cleanPayload = typeof payload === "object" && payload !== null ? Object.fromEntries(Object.entries(payload).filter(([key]) => key !== "verbose")) : payload;
|
|
3111
|
+
const hasOnlyAppIdAndFlowType = typeof cleanPayload === "object" && cleanPayload !== null && "applicationId" in cleanPayload && "flowType" in cleanPayload && Object.keys(cleanPayload).length === 2;
|
|
3112
|
+
const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "flowId" in cleanPayload && Object.keys(cleanPayload).length === 1;
|
|
3113
|
+
const requestPayload = hasOnlyAppIdAndFlowType || hasOnlyFlowId ? { ...cleanPayload, verbose: true } : cleanPayload;
|
|
3108
3114
|
const response = await fetch(endpoint, {
|
|
3109
3115
|
...requestConfig,
|
|
3110
3116
|
method: requestConfig.method || "POST",
|