@asgardeo/react 0.24.0 → 0.24.2
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
CHANGED
|
@@ -13906,13 +13906,21 @@ var BaseAcceptInvite = ({
|
|
|
13906
13906
|
onComplete?.();
|
|
13907
13907
|
},
|
|
13908
13908
|
onError: (error) => {
|
|
13909
|
-
|
|
13909
|
+
if (!error?.flowStatus) {
|
|
13910
|
+
setIsTokenInvalid(true);
|
|
13911
|
+
}
|
|
13910
13912
|
setIsValidatingToken(false);
|
|
13911
13913
|
handleError(error);
|
|
13912
13914
|
},
|
|
13913
13915
|
onFlowChange: (response) => {
|
|
13914
13916
|
onFlowChange?.(response);
|
|
13915
|
-
if (response.flowStatus
|
|
13917
|
+
if (response.flowStatus === "COMPLETE") {
|
|
13918
|
+
setIsComplete(true);
|
|
13919
|
+
const completionComponents = response.data?.components || response.data?.meta?.components || [];
|
|
13920
|
+
if (completionComponents.length > 0) {
|
|
13921
|
+
setCurrentFlow(response);
|
|
13922
|
+
}
|
|
13923
|
+
} else {
|
|
13916
13924
|
setCurrentFlow(response);
|
|
13917
13925
|
setFormValues({});
|
|
13918
13926
|
setFormErrors({});
|
|
@@ -14045,6 +14053,10 @@ var BaseAcceptInvite = ({
|
|
|
14045
14053
|
if (tokenValidationAttemptedRef.current) {
|
|
14046
14054
|
return;
|
|
14047
14055
|
}
|
|
14056
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
14057
|
+
if (urlParams.get("code")) {
|
|
14058
|
+
return;
|
|
14059
|
+
}
|
|
14048
14060
|
if (!executionId || !inviteToken) {
|
|
14049
14061
|
setIsValidatingToken(false);
|
|
14050
14062
|
setIsTokenInvalid(true);
|