authhero 8.12.0 → 8.12.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/authhero.cjs +3 -3
- package/dist/authhero.d.ts +83 -83
- package/dist/authhero.mjs +25 -23
- package/dist/stats.html +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/passwordless.d.ts +4 -4
- package/dist/types/helpers/dcr/metadata-mapping.d.ts +2 -2
- package/dist/types/index.d.ts +83 -83
- package/dist/types/routes/auth-api/index.d.ts +22 -22
- package/dist/types/routes/auth-api/passwordless.d.ts +10 -10
- package/dist/types/routes/auth-api/register/index.d.ts +2 -2
- package/dist/types/routes/auth-api/token.d.ts +10 -10
- package/dist/types/routes/management-api/action-executions.d.ts +1 -1
- package/dist/types/routes/management-api/actions.d.ts +1 -1
- package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
- package/dist/types/routes/management-api/client-grants.d.ts +8 -8
- package/dist/types/routes/management-api/clients.d.ts +9 -9
- package/dist/types/routes/management-api/connections.d.ts +5 -5
- package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
- package/dist/types/routes/management-api/email-templates.d.ts +2 -2
- package/dist/types/routes/management-api/emails.d.ts +2 -2
- package/dist/types/routes/management-api/failed-events.d.ts +1 -1
- package/dist/types/routes/management-api/guardian.d.ts +5 -5
- package/dist/types/routes/management-api/hooks.d.ts +2 -2
- package/dist/types/routes/management-api/index.d.ts +56 -56
- package/dist/types/routes/management-api/logs.d.ts +3 -3
- package/dist/types/routes/management-api/organizations.d.ts +2 -2
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/users.d.ts +2 -2
- package/dist/types/routes/universal-login/common.d.ts +4 -4
- package/dist/types/routes/universal-login/flow-api.d.ts +8 -8
- package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
- package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
- package/dist/types/types/IdToken.d.ts +1 -1
- package/package.json +1 -1
package/dist/authhero.mjs
CHANGED
|
@@ -8517,7 +8517,7 @@ var ane = (e, t) => {
|
|
|
8517
8517
|
}, Yd = (e, t, n, r) => {
|
|
8518
8518
|
let i = une(t, n, r);
|
|
8519
8519
|
e.header("Set-Cookie", i, { append: !0 });
|
|
8520
|
-
}, Xd = "
|
|
8520
|
+
}, Xd = "mr3gjbzt", dne = /* @__PURE__ */ p({
|
|
8521
8521
|
common: () => Zd,
|
|
8522
8522
|
consent: () => Qd,
|
|
8523
8523
|
default: () => fne,
|
|
@@ -74410,8 +74410,8 @@ var Ile = {
|
|
|
74410
74410
|
cookies: i
|
|
74411
74411
|
} : { response: e };
|
|
74412
74412
|
} catch (t) {
|
|
74413
|
-
let n = t, r = n.message || s
|
|
74414
|
-
return n.code === "INVALID_PASSWORD" || n.code === "USER_NOT_FOUND" ? r = s
|
|
74413
|
+
let n = t, r = n.message || s.wrongCredentials();
|
|
74414
|
+
return n.code === "INVALID_PASSWORD" || n.code === "USER_NOT_FOUND" ? r = s.wrongCredentials() : n.code === "EMAIL_NOT_VERIFIED" ? r = s.unverifiedEmail() : n.code === "TOO_MANY_FAILED_LOGINS" && (r = s.tooManyFailedLogins()), {
|
|
74415
74415
|
error: r,
|
|
74416
74416
|
screen: await I5({
|
|
74417
74417
|
...e,
|
|
@@ -84684,9 +84684,9 @@ function efe(n) {
|
|
|
84684
84684
|
method: "post",
|
|
84685
84685
|
path: "/",
|
|
84686
84686
|
request: { body: { content: { "application/json": { schema: r.object({ data: r.object({
|
|
84687
|
-
identifier: r.string().trim()
|
|
84688
|
-
password: r.string()
|
|
84689
|
-
confirm_password: r.string()
|
|
84687
|
+
identifier: r.string().trim(),
|
|
84688
|
+
password: r.string(),
|
|
84689
|
+
confirm_password: r.string(),
|
|
84690
84690
|
name: r.string().optional()
|
|
84691
84691
|
}) }) } } } },
|
|
84692
84692
|
responses: {
|
|
@@ -84697,36 +84697,38 @@ function efe(n) {
|
|
|
84697
84697
|
}), async (e) => {
|
|
84698
84698
|
let { tenants: t } = await e.env.data.tenants.list();
|
|
84699
84699
|
if (t.length > 0) return e.notFound();
|
|
84700
|
-
let { identifier: n, password: r, confirm_password: i, name: o } = e.req.valid("json").data
|
|
84701
|
-
|
|
84702
|
-
|
|
84703
|
-
|
|
84704
|
-
|
|
84705
|
-
|
|
84706
|
-
|
|
84707
|
-
|
|
84700
|
+
let { identifier: n, password: r, confirm_password: i, name: o } = e.req.valid("json").data, l = (t) => {
|
|
84701
|
+
let n = c(t);
|
|
84702
|
+
return (e.req.header("Accept") || "").includes("application/json") ? e.json({ screen: n }) : u(e, n, "setup");
|
|
84703
|
+
};
|
|
84704
|
+
if (!n) return l("Please enter an admin username or email.");
|
|
84705
|
+
if (r.length < 8) return l("Password must be at least 8 characters.");
|
|
84706
|
+
if (r !== i) return l("Passwords do not match.");
|
|
84707
|
+
let { connectionType: d, normalized: f, isValid: p } = RV(n), m = f || n, h = d === "email" && p ? m : void 0, g = o || (a ? "Control Plane" : "My App"), _ = a ? "control_plane" : s(g) || "my_app", v = new URL(e.req.url).origin, y = [
|
|
84708
|
+
`${v}/auth-callback`,
|
|
84709
|
+
`${v}/admin/auth-callback`,
|
|
84708
84710
|
"https://manage.authhero.net/auth-callback",
|
|
84709
84711
|
"https://local.authhero.net/auth-callback",
|
|
84710
84712
|
"https://localhost:5173/auth-callback",
|
|
84711
84713
|
"http://localhost:3000/auth-callback",
|
|
84712
84714
|
"http://localhost:3000/admin/auth-callback"
|
|
84713
|
-
],
|
|
84714
|
-
|
|
84715
|
-
`${
|
|
84715
|
+
], b = [
|
|
84716
|
+
v,
|
|
84717
|
+
`${v}/admin`,
|
|
84716
84718
|
"https://manage.authhero.net",
|
|
84717
84719
|
"https://local.authhero.net",
|
|
84718
84720
|
"http://localhost:5173",
|
|
84719
84721
|
"http://localhost:3000"
|
|
84720
84722
|
];
|
|
84721
84723
|
return await T9(e.env.data, {
|
|
84722
|
-
adminUsername:
|
|
84723
|
-
adminEmail:
|
|
84724
|
+
adminUsername: m,
|
|
84725
|
+
adminEmail: h,
|
|
84724
84726
|
adminPassword: r,
|
|
84725
|
-
tenantId:
|
|
84726
|
-
tenantName:
|
|
84727
|
+
tenantId: _,
|
|
84728
|
+
tenantName: g,
|
|
84727
84729
|
isControlPlane: a,
|
|
84728
|
-
callbacks:
|
|
84729
|
-
allowedLogoutUrls:
|
|
84730
|
+
callbacks: y,
|
|
84731
|
+
allowedLogoutUrls: b,
|
|
84730
84732
|
debug: !1
|
|
84731
84733
|
}), (e.req.header("Accept") || "").includes("application/json") ? e.json({ redirect: "/setup/complete" }) : e.redirect("/setup/complete");
|
|
84732
84734
|
}), o.openapi(t({
|