@asgardeo/react 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/index.js.map +2 -2
- package/dist/index.js +12 -0
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -913,8 +913,15 @@ var AsgardeoReactClient = class extends import_browser6.AsgardeoBrowserClient {
|
|
|
913
913
|
const firstArg = args[0];
|
|
914
914
|
const baseUrl = config?.baseUrl;
|
|
915
915
|
if (config.platform === import_browser6.Platform.AsgardeoV2) {
|
|
916
|
+
const authIdFromUrl = new URL(window.location.href).searchParams.get("authId");
|
|
917
|
+
const authIdFromStorage = sessionStorage.getItem("asgardeo_auth_id");
|
|
918
|
+
const authId = authIdFromUrl || authIdFromStorage;
|
|
919
|
+
if (authIdFromUrl && !authIdFromStorage) {
|
|
920
|
+
sessionStorage.setItem("asgardeo_auth_id", authIdFromUrl);
|
|
921
|
+
}
|
|
916
922
|
return (0, import_browser6.executeEmbeddedSignUpFlowV2)({
|
|
917
923
|
baseUrl,
|
|
924
|
+
authId,
|
|
918
925
|
payload: typeof firstArg === "object" && "flowType" in firstArg ? { ...firstArg, verbose: true } : firstArg
|
|
919
926
|
});
|
|
920
927
|
}
|
|
@@ -10095,6 +10102,11 @@ var SignUp2 = ({
|
|
|
10095
10102
|
const handleOnSubmit = async (payload) => await signUp(payload);
|
|
10096
10103
|
const handleComplete = (response) => {
|
|
10097
10104
|
onComplete?.(response);
|
|
10105
|
+
const oauthRedirectUrl = response?.redirectUrl;
|
|
10106
|
+
if (shouldRedirectAfterSignUp && oauthRedirectUrl) {
|
|
10107
|
+
window.location.href = oauthRedirectUrl;
|
|
10108
|
+
return;
|
|
10109
|
+
}
|
|
10098
10110
|
if (shouldRedirectAfterSignUp && response?.type !== import_browser63.EmbeddedFlowResponseType.Redirection && afterSignUpUrl) {
|
|
10099
10111
|
window.location.href = afterSignUpUrl;
|
|
10100
10112
|
}
|