@wacht/jsx 0.0.1-alpha.31 → 0.0.1-alpha.32
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/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +21 -22
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1054,27 +1054,21 @@ function Sd() {
|
|
|
1054
1054
|
},
|
|
1055
1055
|
// Identifier-First flow methods
|
|
1056
1056
|
identify: async (s) => {
|
|
1057
|
-
console.log("[identify] Starting with identifier:", s);
|
|
1058
1057
|
const a = new FormData();
|
|
1059
1058
|
a.append("identifier", s);
|
|
1060
1059
|
const h = await e("/auth/identify", {
|
|
1061
1060
|
method: "POST",
|
|
1062
1061
|
body: a
|
|
1063
1062
|
});
|
|
1064
|
-
|
|
1065
|
-
const f = await q(h);
|
|
1066
|
-
return console.log("[identify] Mapped result:", f), f.data;
|
|
1063
|
+
return (await q(h)).data;
|
|
1067
1064
|
},
|
|
1068
1065
|
initEnterpriseSso: async (s, a) => {
|
|
1069
|
-
console.log("[initEnterpriseSso] Starting with connectionId:", s, "redirectUri:", a);
|
|
1070
1066
|
const h = new URLSearchParams({ connection_id: s });
|
|
1071
1067
|
a && h.append("redirect_uri", a);
|
|
1072
1068
|
const f = await e(`/auth/sso/login?${h.toString()}`, {
|
|
1073
1069
|
method: "POST"
|
|
1074
1070
|
});
|
|
1075
|
-
|
|
1076
|
-
const c = await q(f);
|
|
1077
|
-
return console.log("[initEnterpriseSso] Mapped result:", c), c.data;
|
|
1071
|
+
return (await q(f)).data;
|
|
1078
1072
|
}
|
|
1079
1073
|
},
|
|
1080
1074
|
discardSignInAttempt: () => {
|
|
@@ -1213,32 +1207,37 @@ function zd() {
|
|
|
1213
1207
|
};
|
|
1214
1208
|
}
|
|
1215
1209
|
const Ke = () => {
|
|
1216
|
-
const { adapter: e, deployment: t } = Se(), o = e.useNavigate(), n = (
|
|
1217
|
-
o ? o(
|
|
1210
|
+
const { adapter: e, deployment: t } = Se(), o = e.useNavigate(), n = (c, p) => {
|
|
1211
|
+
o ? o(c, p) : window.location.href = c;
|
|
1212
|
+
}, s = (c) => {
|
|
1213
|
+
if (c)
|
|
1214
|
+
return c;
|
|
1215
|
+
const d = new URLSearchParams(window.location.search).get("redirect_uri");
|
|
1216
|
+
return d || window.location.href;
|
|
1218
1217
|
};
|
|
1219
1218
|
return {
|
|
1220
1219
|
navigate: n,
|
|
1221
|
-
navigateToSignIn: (
|
|
1220
|
+
navigateToSignIn: (c) => {
|
|
1222
1221
|
if (!t) return;
|
|
1223
|
-
const
|
|
1224
|
-
|
|
1225
|
-
`${t.ui_settings.sign_in_page_url}?${
|
|
1222
|
+
const p = s(c), d = new URLSearchParams();
|
|
1223
|
+
d.set("redirect_uri", p), (t == null ? void 0 : t.mode) === "staging" && d.set("dev_session", localStorage.getItem("__dev_session__") ?? ""), n(
|
|
1224
|
+
`${t.ui_settings.sign_in_page_url}?${d.toString()}`,
|
|
1226
1225
|
{ replace: !0 }
|
|
1227
1226
|
);
|
|
1228
1227
|
},
|
|
1229
|
-
navigateToAccountSelection: (
|
|
1228
|
+
navigateToAccountSelection: (c) => {
|
|
1230
1229
|
if (!t) return;
|
|
1231
|
-
const
|
|
1232
|
-
|
|
1233
|
-
`https://${t.frontend_host}?${
|
|
1230
|
+
const p = s(c), d = new URLSearchParams();
|
|
1231
|
+
d.set("redirect_uri", p), (t == null ? void 0 : t.mode) === "staging" && d.set("dev_session", localStorage.getItem("__dev_session__") ?? ""), n(
|
|
1232
|
+
`https://${t.frontend_host}?${d.toString()}`,
|
|
1234
1233
|
{ replace: !0 }
|
|
1235
1234
|
);
|
|
1236
1235
|
},
|
|
1237
|
-
navigateToSignUp: (
|
|
1236
|
+
navigateToSignUp: (c) => {
|
|
1238
1237
|
if (!t) return;
|
|
1239
|
-
const
|
|
1240
|
-
|
|
1241
|
-
`${t.ui_settings.sign_up_page_url}?${
|
|
1238
|
+
const p = s(c), d = new URLSearchParams();
|
|
1239
|
+
d.set("redirect_uri", p), (t == null ? void 0 : t.mode) === "staging" && d.set("dev_session", localStorage.getItem("__dev_session__") ?? ""), n(
|
|
1240
|
+
`${t.ui_settings.sign_up_page_url}?${d.toString()}`,
|
|
1242
1241
|
{ replace: !0 }
|
|
1243
1242
|
);
|
|
1244
1243
|
}
|