@burdenoff/microfe-auth 2026.526.1 → 2026.527.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/auth/AuthRoutes.js +1 -1
- package/dist/auth/AuthRoutes.js.map +1 -1
- package/dist/auth/components/AuthLayout.js +14 -14
- package/dist/auth/components/AuthLayout.js.map +1 -1
- package/dist/auth/components/CaptchaV2.js +1 -4
- package/dist/auth/components/CaptchaV2.js.map +1 -1
- package/dist/auth/components/ConfirmActionDialog.js +3 -3
- package/dist/auth/components/ConfirmActionDialog.js.map +1 -1
- package/dist/auth/components/profile/UserProfileMenu.js +10 -6
- package/dist/auth/components/profile/UserProfileMenu.js.map +1 -1
- package/dist/auth/components/workspace/WorkspaceSelector.js +5 -5
- package/dist/auth/components/workspace/WorkspaceSelector.js.map +1 -1
- package/dist/auth/hooks/index.js +2 -2
- package/dist/auth/index.js +4 -4
- package/dist/auth/pages/AuditLogPage.js +7 -7
- package/dist/auth/pages/AuditLogPage.js.map +1 -1
- package/dist/auth/pages/EmailVerifyPage.js +10 -8
- package/dist/auth/pages/EmailVerifyPage.js.map +1 -1
- package/dist/auth/pages/LoginPage.js +113 -94
- package/dist/auth/pages/LoginPage.js.map +1 -1
- package/dist/auth/pages/MagicLinkPage.js +10 -8
- package/dist/auth/pages/MagicLinkPage.js.map +1 -1
- package/dist/auth/pages/MfaSetupPage.js +26 -21
- package/dist/auth/pages/MfaSetupPage.js.map +1 -1
- package/dist/auth/pages/MfaVerifyPage.js +21 -21
- package/dist/auth/pages/MfaVerifyPage.js.map +1 -1
- package/dist/auth/pages/OAuthCallbackPage.js +7 -6
- package/dist/auth/pages/OAuthCallbackPage.js.map +1 -1
- package/dist/auth/pages/PasswordResetPage.js +25 -22
- package/dist/auth/pages/PasswordResetPage.js.map +1 -1
- package/dist/auth/pages/ReactivatePage.js +17 -15
- package/dist/auth/pages/ReactivatePage.js.map +1 -1
- package/dist/auth/pages/RegisterPage.js +198 -194
- package/dist/auth/pages/RegisterPage.js.map +1 -1
- package/dist/auth/pages/SSOClearPage.js +1 -1
- package/dist/auth/pages/SSOClearPage.js.map +1 -1
- package/dist/auth/pages/SSODepositPage.js +1 -1
- package/dist/auth/pages/SSODepositPage.js.map +1 -1
- package/dist/auth/pages/SSORelayCallbackPage.js +1 -1
- package/dist/auth/pages/SSORelayCallbackPage.js.map +1 -1
- package/dist/auth/pages/SSORelayPage.js +1 -1
- package/dist/auth/pages/SSORelayPage.js.map +1 -1
- package/dist/auth/pages/SecurityPage.js +15 -16
- package/dist/auth/pages/SecurityPage.js.map +1 -1
- package/dist/auth/pages/SessionsPage.js +19 -20
- package/dist/auth/pages/SessionsPage.js.map +1 -1
- package/dist/auth/pages/SsoCallbackPage.js +19 -15
- package/dist/auth/pages/SsoCallbackPage.js.map +1 -1
- package/dist/auth/pages/SsoConfigPage.js +41 -27
- package/dist/auth/pages/SsoConfigPage.js.map +1 -1
- package/dist/auth/pages/SsoLoginPage.js +16 -14
- package/dist/auth/pages/SsoLoginPage.js.map +1 -1
- package/dist/auth/pages/UserDetailsPage.js +16 -17
- package/dist/auth/pages/UserDetailsPage.js.map +1 -1
- package/dist/auth/pages/UserProfilePage.js +31 -25
- package/dist/auth/pages/UserProfilePage.js.map +1 -1
- package/dist/auth/pages/UsersPage.js +46 -42
- package/dist/auth/pages/UsersPage.js.map +1 -1
- package/dist/index.js +11 -11
- package/dist/microfe-auth.css +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,6 @@ import { useAuthStore as e } from "../store/authStore.js";
|
|
|
2
2
|
import { useAuthOperations as t } from "../hooks/useAuthOperations.js";
|
|
3
3
|
import { useMyWorkspaces as n } from "../hooks/useMyWorkspaces.js";
|
|
4
4
|
import { useOAuthOperations as r } from "../hooks/useOAuthOperations.js";
|
|
5
|
-
import "../hooks/index.js";
|
|
6
5
|
import { AuthLayout as i } from "../components/AuthLayout.js";
|
|
7
6
|
import { AlertIcon as a, EmailIcon as o, EyeIcon as s, EyeOffIcon as c, GoogleIcon as l, LockIcon as ee, MicrosoftIcon as u, SpinnerIcon as te } from "../components/AuthIcons.js";
|
|
8
7
|
import { useCaptchaV3 as ne } from "../hooks/useCaptchaV3.js";
|
|
@@ -12,9 +11,9 @@ import { useLocation as oe, useNavigate as se, useSearchParams as ce } from "rea
|
|
|
12
11
|
import { useActiveContext as le, useI18n as ue } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
13
12
|
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
14
13
|
import { resolveAuthBridgeConfig as de } from "@burdenoff/fe-libs/shared/config";
|
|
15
|
-
import { getProfileTokens as _, getProfileUser as
|
|
14
|
+
import { getProfileTokens as _, getProfileUser as v, getProfileWorkspaceToken as fe, getProfiles as y, resolveActiveProfileId as pe } from "@burdenoff/fe-libs/shared/providers/shell/ProfileStorageManager";
|
|
16
15
|
//#region src/auth/pages/LoginPage.tsx
|
|
17
|
-
function
|
|
16
|
+
function me() {
|
|
18
17
|
if (typeof window > "u") return !1;
|
|
19
18
|
let e = window;
|
|
20
19
|
if (typeof e.Capacitor?.isNativePlatform == "function") try {
|
|
@@ -22,7 +21,7 @@ function b() {
|
|
|
22
21
|
} catch {}
|
|
23
22
|
return !!(typeof navigator < "u" && /Electron/i.test(navigator.userAgent || ""));
|
|
24
23
|
}
|
|
25
|
-
function
|
|
24
|
+
function he(e) {
|
|
26
25
|
if (typeof window > "u") return e;
|
|
27
26
|
try {
|
|
28
27
|
let t = new URL(e, window.location.origin);
|
|
@@ -31,7 +30,7 @@ function me(e) {
|
|
|
31
30
|
return e;
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
|
-
function
|
|
33
|
+
function ge(e) {
|
|
35
34
|
try {
|
|
36
35
|
let t = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "="), r = JSON.parse(atob(n));
|
|
37
36
|
return typeof r.exp == "number" && r.exp > Date.now() / 1e3;
|
|
@@ -39,36 +38,54 @@ function he(e) {
|
|
|
39
38
|
return !1;
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
|
-
function
|
|
41
|
+
function _e(e) {
|
|
43
42
|
if (!e) return null;
|
|
44
43
|
try {
|
|
45
44
|
let t = new URL(decodeURIComponent(e), window.location.origin);
|
|
46
|
-
return t.origin === window.location.origin ?
|
|
45
|
+
return t.origin === window.location.origin ? b(t, { includeOrigin: !1 }) : null;
|
|
47
46
|
} catch {
|
|
48
47
|
return null;
|
|
49
48
|
}
|
|
50
49
|
}
|
|
50
|
+
function b(e, t) {
|
|
51
|
+
for (let t of [
|
|
52
|
+
"sso_failed",
|
|
53
|
+
"sso-failed",
|
|
54
|
+
"sso-attempted"
|
|
55
|
+
]) e.searchParams.delete(t);
|
|
56
|
+
if (t.includeOrigin) return e.toString();
|
|
57
|
+
let n = e.searchParams.toString();
|
|
58
|
+
return `${e.pathname}${n ? `?${n}` : ""}${e.hash}`;
|
|
59
|
+
}
|
|
60
|
+
function ve(e) {
|
|
61
|
+
try {
|
|
62
|
+
let t = new URL(decodeURIComponent(e), window.location.origin);
|
|
63
|
+
return b(t, { includeOrigin: t.origin !== window.location.origin });
|
|
64
|
+
} catch {
|
|
65
|
+
return e;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
51
68
|
function x() {
|
|
52
|
-
let
|
|
53
|
-
let n =
|
|
69
|
+
let b = se(), x = oe(), [S] = ce(), { t: ye } = ue(), C = d((e, t) => {
|
|
70
|
+
let n = ye(e);
|
|
54
71
|
return n === e ? t : n;
|
|
55
|
-
}, [
|
|
56
|
-
if (typeof window > "u" ||
|
|
72
|
+
}, [ye]), { signIn: be, isLoading: w, error: T, errorCode: E, resendVerification: xe } = t(), { completeAuthFlow: Se } = n(), { setWorkspace: D, setOrganization: O } = le(), { initiateGoogleOAuth: Ce, initiateMicrosoftOAuth: we, isProviderConfigured: k } = r(), A = e((e) => e.mfaRequired), { executeRecaptcha: Te } = ne(), [j, M] = p(!1), [Ee, De] = p(!1), N = d((e) => {
|
|
73
|
+
if (typeof window > "u" || me()) return e;
|
|
57
74
|
try {
|
|
58
75
|
let t = de(), n = new URL(t.url), r = window.location.origin;
|
|
59
76
|
if (n.origin === r) return e;
|
|
60
|
-
let i = new URL(e, r).href, a =
|
|
77
|
+
let i = new URL(e, r).href, a = pe();
|
|
61
78
|
if (!a) return e;
|
|
62
|
-
let o = _(a), s =
|
|
79
|
+
let o = _(a), s = v(a);
|
|
63
80
|
if (!o || !s) return e;
|
|
64
|
-
let c =
|
|
81
|
+
let c = fe(a), l = {
|
|
65
82
|
profileId: a,
|
|
66
83
|
tokens: JSON.stringify({
|
|
67
84
|
...o,
|
|
68
85
|
workspaceToken: c
|
|
69
86
|
}),
|
|
70
87
|
user: JSON.stringify(s),
|
|
71
|
-
profiles: JSON.stringify(
|
|
88
|
+
profiles: JSON.stringify(y())
|
|
72
89
|
}, ee = btoa(JSON.stringify(l)), u = new URL("/auth/sso-deposit", n.origin);
|
|
73
90
|
return u.searchParams.set("returnTo", i), `${u.href}#sso=${ee}`;
|
|
74
91
|
} catch {
|
|
@@ -79,33 +96,33 @@ function x() {
|
|
|
79
96
|
try {
|
|
80
97
|
sessionStorage.setItem("bf-post-login-return-to", e);
|
|
81
98
|
} catch {}
|
|
82
|
-
if (
|
|
83
|
-
|
|
99
|
+
if (me()) {
|
|
100
|
+
b(he(e));
|
|
84
101
|
return;
|
|
85
102
|
}
|
|
86
103
|
window.location.assign(N(e));
|
|
87
104
|
return;
|
|
88
105
|
}
|
|
89
|
-
|
|
90
|
-
}, [
|
|
106
|
+
b(e);
|
|
107
|
+
}, [b, N]), [F, Oe] = p(!1), [I, L] = p(!1), [ke, R] = p(!1), [Ae, z] = p(!1), [B, V] = p(!1), [H, U] = p(!1), [je, Me] = p(!1), [Ne, W] = p(!1), [Pe, G] = p(null), [Fe, Ie] = p(null), [K, q] = p({
|
|
91
108
|
email: "",
|
|
92
109
|
password: "",
|
|
93
110
|
rememberMe: !1
|
|
94
|
-
}), [J, Y] = p(null), [
|
|
111
|
+
}), [J, Y] = p(null), [Le, X] = p(!1), Z = S.get("mode") === "add-account", Q = S.get("returnTo"), $ = re(Q);
|
|
95
112
|
f(() => {
|
|
96
113
|
!$.current && Q && ($.current = Q);
|
|
97
114
|
}, [Q]), f(() => {
|
|
98
115
|
if (Z || j) return;
|
|
99
|
-
let t =
|
|
116
|
+
let t = pe();
|
|
100
117
|
if (t) {
|
|
101
|
-
let n = _(t), r =
|
|
102
|
-
if (n?.accessToken && r &&
|
|
103
|
-
e.getState().loadFromProfile(t), P(
|
|
118
|
+
let n = _(t), r = v(t);
|
|
119
|
+
if (n?.accessToken && r && ge(n.accessToken)) {
|
|
120
|
+
e.getState().loadFromProfile(t), P(_e(Q) ?? "/");
|
|
104
121
|
return;
|
|
105
122
|
}
|
|
106
123
|
}
|
|
107
124
|
let n = ae();
|
|
108
|
-
n && (
|
|
125
|
+
n && (De(!0), window.location.replace(n));
|
|
109
126
|
}, [
|
|
110
127
|
Z,
|
|
111
128
|
j,
|
|
@@ -124,13 +141,13 @@ function x() {
|
|
|
124
141
|
console.warn("[LoginPage] Failed to load remembered email:", e);
|
|
125
142
|
}
|
|
126
143
|
}, []), f(() => {
|
|
127
|
-
let e =
|
|
128
|
-
e?.message &&
|
|
144
|
+
let e = x.state;
|
|
145
|
+
e?.message && Ie(e.message), e?.email && q((t) => ({
|
|
129
146
|
...t,
|
|
130
147
|
email: e.email
|
|
131
148
|
})), e && window.history.replaceState({}, document.title);
|
|
132
|
-
}, [
|
|
133
|
-
let
|
|
149
|
+
}, [x.state]);
|
|
150
|
+
let Re = (e, t) => {
|
|
134
151
|
if (t) switch (t) {
|
|
135
152
|
case "ACCOUNT_DELETED": return "DELETED";
|
|
136
153
|
case "ACCOUNT_SUSPENDED": return "SUSPENDED";
|
|
@@ -149,14 +166,14 @@ function x() {
|
|
|
149
166
|
...t,
|
|
150
167
|
email: e
|
|
151
168
|
})), S.get("expired") === "true") {
|
|
152
|
-
|
|
169
|
+
Ie(C("auth.login.sessionExpired", "Your session has expired. Please sign in again."));
|
|
153
170
|
let e = window.location.pathname;
|
|
154
171
|
window.history.replaceState({}, document.title, e);
|
|
155
172
|
}
|
|
156
173
|
}, [S, C]), f(() => {
|
|
157
|
-
A &&
|
|
158
|
-
}, [A,
|
|
159
|
-
let
|
|
174
|
+
A && b("/auth/mfa-verify");
|
|
175
|
+
}, [A, b]);
|
|
176
|
+
let ze = async (t) => {
|
|
160
177
|
t.preventDefault(), L(!1), R(!1), z(!1), V(!1), U(!1), X(!1), W(!1), Y(null);
|
|
161
178
|
let n = (K.email ?? "").trim();
|
|
162
179
|
if (!n) {
|
|
@@ -171,13 +188,13 @@ function x() {
|
|
|
171
188
|
Y(C("auth.login.enterPassword", "Please enter your password"));
|
|
172
189
|
return;
|
|
173
190
|
}
|
|
174
|
-
if (Z &&
|
|
191
|
+
if (Z && y().some((e) => e.email.toLowerCase() === n.toLowerCase())) {
|
|
175
192
|
X(!0), Y(null);
|
|
176
193
|
return;
|
|
177
194
|
}
|
|
178
195
|
X(!1);
|
|
179
196
|
try {
|
|
180
|
-
let e = await
|
|
197
|
+
let e = await Te("login"), t = await be({
|
|
181
198
|
email: n,
|
|
182
199
|
password: K.password,
|
|
183
200
|
rememberMe: K.rememberMe,
|
|
@@ -201,9 +218,9 @@ function x() {
|
|
|
201
218
|
console.warn("[LoginPage] Failed to save/clear remembered email:", e);
|
|
202
219
|
}
|
|
203
220
|
M(!0);
|
|
204
|
-
let e = $.current || Q, r = e ?
|
|
221
|
+
let e = $.current || Q, r = e ? ve(e) : "/dashboard";
|
|
205
222
|
try {
|
|
206
|
-
let e = await Promise.race([
|
|
223
|
+
let e = await Promise.race([Se(t.token), new Promise((e) => {
|
|
207
224
|
window.setTimeout(() => {
|
|
208
225
|
e({
|
|
209
226
|
success: !1,
|
|
@@ -211,7 +228,7 @@ function x() {
|
|
|
211
228
|
});
|
|
212
229
|
}, 5e3);
|
|
213
230
|
})]);
|
|
214
|
-
e.success ? (e.workspace && (D(e.workspace.id), e.workspace.organizationId && O(e.workspace.organizationId)), P(r)) : e.error?.includes("No workspaces found") ?
|
|
231
|
+
e.success ? (e.workspace && (D(e.workspace.id), e.workspace.organizationId && O(e.workspace.organizationId)), P(r)) : e.error?.includes("No workspaces found") ? b("/onboarding/create-workspace") : (e.workspace && (D(e.workspace.id), e.workspace.organizationId && O(e.workspace.organizationId)), console.warn("Auth flow warning:", e.error), P(r));
|
|
215
232
|
} catch (e) {
|
|
216
233
|
console.error("Auth flow error (login succeeded):", e), P(r);
|
|
217
234
|
} finally {
|
|
@@ -221,64 +238,64 @@ function x() {
|
|
|
221
238
|
} catch (t) {
|
|
222
239
|
let n = t instanceof Error ? t.message : String(t);
|
|
223
240
|
n.includes("reCAPTCHA") && Y(n);
|
|
224
|
-
let r = e.getState().errorCode, i =
|
|
241
|
+
let r = e.getState().errorCode, i = Re(n, r);
|
|
225
242
|
i === "DELETED" ? R(!0) : i === "SUSPENDED" ? z(!0) : i === "OAUTH_ONLY" ? V(!0) : i === "INACTIVE" ? L(!0) : i === "EMAIL_NOT_VERIFIED" && U(!0);
|
|
226
243
|
}
|
|
227
244
|
};
|
|
228
245
|
f(() => {
|
|
229
246
|
if (T) {
|
|
230
|
-
let e =
|
|
247
|
+
let e = Re(T, E);
|
|
231
248
|
e === "DELETED" ? R(!0) : e === "SUSPENDED" ? z(!0) : e === "OAUTH_ONLY" ? V(!0) : e === "INACTIVE" ? L(!0) : e === "EMAIL_NOT_VERIFIED" && U(!0);
|
|
232
249
|
}
|
|
233
250
|
}, [T, E]);
|
|
234
|
-
let
|
|
251
|
+
let Be = () => {
|
|
235
252
|
G(null);
|
|
236
253
|
try {
|
|
237
|
-
|
|
254
|
+
Ce();
|
|
238
255
|
} catch (e) {
|
|
239
256
|
G(e instanceof Error ? e.message : C("auth.login.googleSignInFailed", "Failed to initiate Google sign in"));
|
|
240
257
|
}
|
|
241
|
-
},
|
|
258
|
+
}, Ve = () => {
|
|
242
259
|
G(null);
|
|
243
260
|
try {
|
|
244
|
-
|
|
261
|
+
we();
|
|
245
262
|
} catch (e) {
|
|
246
263
|
G(e instanceof Error ? e.message : C("auth.login.microsoftSignInFailed", "Failed to initiate Microsoft sign in"));
|
|
247
264
|
}
|
|
248
|
-
},
|
|
249
|
-
|
|
265
|
+
}, He = async () => {
|
|
266
|
+
Me(!0), W(!1);
|
|
250
267
|
try {
|
|
251
|
-
(await
|
|
268
|
+
(await xe((K.email ?? "").trim())).success ? W(!0) : Y(C("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
|
|
252
269
|
} catch (e) {
|
|
253
270
|
console.error("Failed to resend verification email:", e), Y(e instanceof Error ? e.message : C("auth.login.resendFailed", "Failed to resend verification email. Please try again."));
|
|
254
271
|
} finally {
|
|
255
|
-
|
|
272
|
+
Me(!1);
|
|
256
273
|
}
|
|
257
|
-
},
|
|
274
|
+
}, Ue = k("google"), We = k("microsoft"), Ge = [{
|
|
258
275
|
name: "Google",
|
|
259
276
|
icon: l,
|
|
260
|
-
onClick:
|
|
261
|
-
disabled: !
|
|
262
|
-
tooltip:
|
|
277
|
+
onClick: Be,
|
|
278
|
+
disabled: !Ue,
|
|
279
|
+
tooltip: Ue ? void 0 : C("auth.login.googleNotConfigured", "Google sign in is not configured")
|
|
263
280
|
}, {
|
|
264
281
|
name: "Microsoft",
|
|
265
282
|
icon: u,
|
|
266
|
-
onClick:
|
|
267
|
-
disabled: !
|
|
268
|
-
tooltip:
|
|
283
|
+
onClick: Ve,
|
|
284
|
+
disabled: !We,
|
|
285
|
+
tooltip: We ? void 0 : C("auth.login.microsoftNotConfigured", "Microsoft sign in is not configured")
|
|
269
286
|
}];
|
|
270
|
-
return
|
|
287
|
+
return Ee ? /* @__PURE__ */ h(ie, {}) : /* @__PURE__ */ g(i, {
|
|
271
288
|
title: C("auth.login.welcomeBack", "Welcome back"),
|
|
272
289
|
subtitle: C("auth.login.enterCredentials", "Enter your credentials to continue"),
|
|
273
290
|
children: [
|
|
274
291
|
/* @__PURE__ */ g("form", {
|
|
275
|
-
onSubmit:
|
|
292
|
+
onSubmit: ze,
|
|
276
293
|
className: "space-y-5",
|
|
277
294
|
children: [
|
|
278
|
-
|
|
295
|
+
Fe && /* @__PURE__ */ g("div", {
|
|
279
296
|
className: "flex items-start gap-3 p-4 rounded-xl border bg-status-info-bg-subtle border-status-info-border",
|
|
280
297
|
children: [/* @__PURE__ */ h("svg", {
|
|
281
|
-
className: "
|
|
298
|
+
className: "size-5 flex-shrink-0 mt-0.5 text-text-link",
|
|
282
299
|
fill: "none",
|
|
283
300
|
viewBox: "0 0 24 24",
|
|
284
301
|
stroke: "currentColor",
|
|
@@ -290,19 +307,19 @@ function x() {
|
|
|
290
307
|
})
|
|
291
308
|
}), /* @__PURE__ */ h("p", {
|
|
292
309
|
className: "text-sm text-status-info-text",
|
|
293
|
-
children:
|
|
310
|
+
children: Fe
|
|
294
311
|
})]
|
|
295
312
|
}),
|
|
296
313
|
J && /* @__PURE__ */ g("div", {
|
|
297
314
|
className: "flex items-start gap-3 p-4 rounded-xl border bg-status-warning-bg-subtle border-status-warning-border",
|
|
298
|
-
children: [/* @__PURE__ */ h(a, { className: "
|
|
315
|
+
children: [/* @__PURE__ */ h(a, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ h("p", {
|
|
299
316
|
className: "text-sm text-status-warning-text",
|
|
300
317
|
children: J
|
|
301
318
|
})]
|
|
302
319
|
}),
|
|
303
|
-
|
|
320
|
+
Le && /* @__PURE__ */ g("div", {
|
|
304
321
|
className: "flex items-start gap-3 p-4 rounded-xl border bg-status-warning-bg-subtle border-status-warning-border",
|
|
305
|
-
children: [/* @__PURE__ */ h(a, { className: "
|
|
322
|
+
children: [/* @__PURE__ */ h(a, { className: "size-5 flex-shrink-0 mt-0.5 text-status-warning-text" }), /* @__PURE__ */ g("div", {
|
|
306
323
|
className: "flex-1",
|
|
307
324
|
children: [
|
|
308
325
|
/* @__PURE__ */ h("p", {
|
|
@@ -315,10 +332,10 @@ function x() {
|
|
|
315
332
|
}),
|
|
316
333
|
($.current || Q) && /* @__PURE__ */ g("button", {
|
|
317
334
|
type: "button",
|
|
318
|
-
onClick: () =>
|
|
335
|
+
onClick: () => b(decodeURIComponent($.current || Q || "/dashboard")),
|
|
319
336
|
className: "mt-3 inline-flex items-center gap-2 px-4 py-2.5 rounded-xl border border-status-warning-border bg-bg-surface text-status-warning-text text-sm font-medium hover:bg-status-warning-bg-subtle hover:border-status-warning-border transition-all shadow-sm",
|
|
320
337
|
children: [/* @__PURE__ */ h("svg", {
|
|
321
|
-
className: "
|
|
338
|
+
className: "size-4",
|
|
322
339
|
fill: "none",
|
|
323
340
|
viewBox: "0 0 24 24",
|
|
324
341
|
stroke: "currentColor",
|
|
@@ -333,27 +350,27 @@ function x() {
|
|
|
333
350
|
]
|
|
334
351
|
})]
|
|
335
352
|
}),
|
|
336
|
-
T && !J && !
|
|
353
|
+
T && !J && !Le && /* @__PURE__ */ g("div", {
|
|
337
354
|
className: `flex items-start gap-3 p-4 rounded-xl border ${I || B || H ? "bg-status-warning-bg-subtle border-status-warning-border" : "bg-status-error-bg-subtle border-status-error-border"}`,
|
|
338
|
-
children: [/* @__PURE__ */ h(a, { className: `
|
|
355
|
+
children: [/* @__PURE__ */ h(a, { className: `size-5 flex-shrink-0 mt-0.5 ${I || B || H ? "text-status-warning-text" : "text-status-error-text"}` }), /* @__PURE__ */ g("div", {
|
|
339
356
|
className: "flex-1",
|
|
340
357
|
children: [
|
|
341
358
|
/* @__PURE__ */ h("p", {
|
|
342
359
|
className: `text-sm ${I || B || H ? "text-status-warning-text" : "text-status-error-text"}`,
|
|
343
|
-
children:
|
|
360
|
+
children: ke ? C("auth.login.accountDeleted", "This account has been permanently deleted and cannot be recovered.") : Ae ? C("auth.login.accountSuspended", "Your account has been suspended. Please contact support for assistance.") : I ? C("auth.login.accountDeactivated", "Your account has been deactivated.") : B ? C("auth.login.oauthOnly", "This account uses OAuth sign-in. Please use Google or Microsoft to sign in.") : H ? C("auth.login.emailNotVerified", "Please verify your email before signing in. Check your inbox for the verification link.") : T
|
|
344
361
|
}),
|
|
345
362
|
I && /* @__PURE__ */ h("button", {
|
|
346
363
|
type: "button",
|
|
347
|
-
onClick: () =>
|
|
364
|
+
onClick: () => b("/auth/reactivate", { state: { email: K.email } }),
|
|
348
365
|
className: "mt-2 text-sm font-semibold text-status-warning-text hover:text-status-warning-text underline underline-offset-2",
|
|
349
366
|
children: C("auth.login.clickReactivate", "Click here to reactivate your account")
|
|
350
367
|
}),
|
|
351
368
|
H && /* @__PURE__ */ h("div", {
|
|
352
369
|
className: "mt-3",
|
|
353
|
-
children:
|
|
370
|
+
children: Ne ? /* @__PURE__ */ g("div", {
|
|
354
371
|
className: "flex items-center gap-2 text-sm text-status-success-text",
|
|
355
372
|
children: [/* @__PURE__ */ h("svg", {
|
|
356
|
-
className: "
|
|
373
|
+
className: "size-4",
|
|
357
374
|
fill: "none",
|
|
358
375
|
viewBox: "0 0 24 24",
|
|
359
376
|
stroke: "currentColor",
|
|
@@ -366,11 +383,11 @@ function x() {
|
|
|
366
383
|
}), C("auth.login.verificationSent", "Verification email sent! Please check your inbox.")]
|
|
367
384
|
}) : /* @__PURE__ */ h("button", {
|
|
368
385
|
type: "button",
|
|
369
|
-
onClick:
|
|
370
|
-
disabled:
|
|
386
|
+
onClick: He,
|
|
387
|
+
disabled: je,
|
|
371
388
|
className: "inline-flex items-center gap-2 px-4 py-2.5 rounded-xl border border-status-warning-border bg-bg-surface text-status-warning-text text-sm font-medium hover:bg-status-warning-bg-subtle hover:border-status-warning-border transition-all shadow-sm disabled:opacity-50 disabled:cursor-not-allowed",
|
|
372
|
-
children:
|
|
373
|
-
className: "
|
|
389
|
+
children: je ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(te, { className: "size-4 animate-spin" }), C("auth.login.sending", "Sending...")] }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("svg", {
|
|
390
|
+
className: "size-4",
|
|
374
391
|
fill: "none",
|
|
375
392
|
viewBox: "0 0 24 24",
|
|
376
393
|
stroke: "currentColor",
|
|
@@ -387,14 +404,14 @@ function x() {
|
|
|
387
404
|
className: "mt-3 flex flex-col gap-2",
|
|
388
405
|
children: [k("google") && /* @__PURE__ */ g("button", {
|
|
389
406
|
type: "button",
|
|
390
|
-
onClick:
|
|
407
|
+
onClick: Be,
|
|
391
408
|
className: "inline-flex items-center justify-center gap-2 px-4 py-2.5 rounded-xl border border-border-default bg-bg-surface text-text-primary text-sm font-medium hover:bg-bg-canvas hover:border-border-default transition-all shadow-sm",
|
|
392
|
-
children: [/* @__PURE__ */ h(l, { className: "
|
|
409
|
+
children: [/* @__PURE__ */ h(l, { className: "size-5" }), C("auth.login.signInWithGoogle", "Sign in with Google")]
|
|
393
410
|
}), k("microsoft") && /* @__PURE__ */ g("button", {
|
|
394
411
|
type: "button",
|
|
395
|
-
onClick:
|
|
412
|
+
onClick: Ve,
|
|
396
413
|
className: "inline-flex items-center justify-center gap-2 px-4 py-2.5 rounded-xl border border-border-default bg-bg-surface text-text-primary text-sm font-medium hover:bg-bg-canvas hover:border-border-default transition-all shadow-sm",
|
|
397
|
-
children: [/* @__PURE__ */ h(u, { className: "
|
|
414
|
+
children: [/* @__PURE__ */ h(u, { className: "size-5" }), C("auth.login.signInWithMicrosoft", "Sign in with Microsoft")]
|
|
398
415
|
})]
|
|
399
416
|
})
|
|
400
417
|
]
|
|
@@ -410,7 +427,7 @@ function x() {
|
|
|
410
427
|
className: "relative",
|
|
411
428
|
children: [/* @__PURE__ */ h("div", {
|
|
412
429
|
className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
|
|
413
|
-
children: /* @__PURE__ */ h(o, { className: "
|
|
430
|
+
children: /* @__PURE__ */ h(o, { className: "size-5 text-[var(--color-text-tertiary)]" })
|
|
414
431
|
}), /* @__PURE__ */ h("input", {
|
|
415
432
|
id: "email",
|
|
416
433
|
type: "email",
|
|
@@ -438,7 +455,7 @@ function x() {
|
|
|
438
455
|
children: [
|
|
439
456
|
/* @__PURE__ */ h("div", {
|
|
440
457
|
className: "absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",
|
|
441
|
-
children: /* @__PURE__ */ h(ee, { className: "
|
|
458
|
+
children: /* @__PURE__ */ h(ee, { className: "size-5 text-[var(--color-text-tertiary)]" })
|
|
442
459
|
}),
|
|
443
460
|
/* @__PURE__ */ h("input", {
|
|
444
461
|
id: "password",
|
|
@@ -456,10 +473,10 @@ function x() {
|
|
|
456
473
|
}),
|
|
457
474
|
/* @__PURE__ */ h("button", {
|
|
458
475
|
type: "button",
|
|
459
|
-
onClick: () =>
|
|
476
|
+
onClick: () => Oe(!F),
|
|
460
477
|
"aria-label": F ? "Hide password" : "Show password",
|
|
461
478
|
className: "absolute inset-y-0 right-0 pr-3.5 flex items-center text-[var(--color-text-tertiary)] hover:text-[var(--color-text-secondary)] transition-colors",
|
|
462
|
-
children: h(F ? c : s, { className: "
|
|
479
|
+
children: h(F ? c : s, { className: "size-5" })
|
|
463
480
|
})
|
|
464
481
|
]
|
|
465
482
|
})]
|
|
@@ -486,9 +503,9 @@ function x() {
|
|
|
486
503
|
},
|
|
487
504
|
className: "sr-only peer"
|
|
488
505
|
}), /* @__PURE__ */ h("div", {
|
|
489
|
-
className: "
|
|
506
|
+
className: "size-5 rounded-md border-2 border-[var(--color-border-default)] bg-[var(--color-bg-surface)] peer-checked:bg-status-info-bg-subtle0 peer-checked:border-action-primary-bg transition-all peer-focus:ring-2 peer-focus:ring-action-primary-bg/20",
|
|
490
507
|
children: /* @__PURE__ */ h("svg", {
|
|
491
|
-
className: "
|
|
508
|
+
className: "size-full text-white opacity-0 peer-checked:opacity-100 transition-opacity p-0.5",
|
|
492
509
|
fill: "none",
|
|
493
510
|
viewBox: "0 0 24 24",
|
|
494
511
|
stroke: "currentColor",
|
|
@@ -506,7 +523,7 @@ function x() {
|
|
|
506
523
|
})]
|
|
507
524
|
}), /* @__PURE__ */ h("button", {
|
|
508
525
|
type: "button",
|
|
509
|
-
onClick: () =>
|
|
526
|
+
onClick: () => b("/auth/reset-password"),
|
|
510
527
|
className: "text-sm font-medium text-text-link hover:text-text-linkHover transition-colors",
|
|
511
528
|
children: C("auth.login.forgotPassword", "Forgot password?")
|
|
512
529
|
})]
|
|
@@ -515,7 +532,7 @@ function x() {
|
|
|
515
532
|
type: "submit",
|
|
516
533
|
disabled: w || j,
|
|
517
534
|
className: "auth-primary-button flex w-full items-center justify-center gap-2 px-4 py-3 font-semibold",
|
|
518
|
-
children: w || j ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(te, { className: "
|
|
535
|
+
children: w || j ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(te, { className: "size-5 animate-spin" }), /* @__PURE__ */ h("span", { children: j ? C("auth.login.settingUpWorkspace", "Setting up workspace...") : C("auth.login.signingIn", "Signing in...") })] }) : C("auth.login.signIn", "Sign in")
|
|
519
536
|
})
|
|
520
537
|
]
|
|
521
538
|
}),
|
|
@@ -532,23 +549,23 @@ function x() {
|
|
|
532
549
|
})
|
|
533
550
|
})]
|
|
534
551
|
}),
|
|
535
|
-
|
|
552
|
+
Pe && /* @__PURE__ */ g("div", {
|
|
536
553
|
className: "flex items-start gap-3 p-4 rounded-xl border bg-status-error-bg-subtle border-status-error-border",
|
|
537
|
-
children: [/* @__PURE__ */ h(a, { className: "
|
|
554
|
+
children: [/* @__PURE__ */ h(a, { className: "size-5 flex-shrink-0 mt-0.5 text-status-error-text" }), /* @__PURE__ */ h("p", {
|
|
538
555
|
className: "text-sm text-status-error-text",
|
|
539
|
-
children:
|
|
556
|
+
children: Pe
|
|
540
557
|
})]
|
|
541
558
|
}),
|
|
542
559
|
/* @__PURE__ */ h("div", {
|
|
543
560
|
className: "grid grid-cols-3 gap-3",
|
|
544
|
-
children:
|
|
561
|
+
children: Ge.map((e) => /* @__PURE__ */ g("button", {
|
|
545
562
|
type: "button",
|
|
546
563
|
onClick: e.onClick,
|
|
547
564
|
disabled: e.disabled,
|
|
548
565
|
title: e.tooltip,
|
|
549
566
|
"aria-label": e.name,
|
|
550
567
|
className: `flex items-center justify-center gap-2 px-4 py-3 rounded-xl border transition-all duration-200 group ${e.disabled ? "border-[var(--color-border-subtle)] bg-[var(--color-bg-disabled)] cursor-not-allowed opacity-50" : "border-[var(--color-border-default)] bg-[var(--color-bg-surface)] hover:bg-[var(--color-bg-sunken)] hover:border-[var(--color-border-strong)]"}`,
|
|
551
|
-
children: [/* @__PURE__ */ h(e.icon, { className: `
|
|
568
|
+
children: [/* @__PURE__ */ h(e.icon, { className: `size-5 ${e.disabled ? "opacity-50" : ""}` }), /* @__PURE__ */ h("span", {
|
|
552
569
|
className: `sr-only sm:not-sr-only text-sm font-medium transition-colors hidden sm:inline ${e.disabled ? "text-[var(--color-text-disabled)]" : "text-[var(--color-text-secondary)] group-hover:text-[var(--color-text-primary)]"}`,
|
|
553
570
|
children: e.name
|
|
554
571
|
})]
|
|
@@ -557,7 +574,8 @@ function x() {
|
|
|
557
574
|
/* @__PURE__ */ h("div", {
|
|
558
575
|
className: "mt-4 text-center",
|
|
559
576
|
children: /* @__PURE__ */ g("button", {
|
|
560
|
-
|
|
577
|
+
type: "button",
|
|
578
|
+
onClick: () => b("/auth/magic-link"),
|
|
561
579
|
className: "text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] transition-colors",
|
|
562
580
|
children: [
|
|
563
581
|
C("auth.login.preferPasswordless", "Prefer passwordless login?"),
|
|
@@ -575,7 +593,8 @@ function x() {
|
|
|
575
593
|
C("auth.login.dontHaveAccount", "Don't have an account?"),
|
|
576
594
|
" ",
|
|
577
595
|
/* @__PURE__ */ h("button", {
|
|
578
|
-
|
|
596
|
+
type: "button",
|
|
597
|
+
onClick: () => b("/auth/register"),
|
|
579
598
|
className: "font-semibold text-text-link hover:text-text-linkHover transition-colors",
|
|
580
599
|
children: C("auth.login.signUp", "Sign up")
|
|
581
600
|
})
|