authhero 0.151.0 → 0.152.0
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 +5 -5
- package/dist/authhero.d.ts +6 -0
- package/dist/authhero.mjs +14 -6
- package/package.json +3 -3
package/dist/authhero.d.ts
CHANGED
|
@@ -8594,6 +8594,7 @@ export declare const codeInsertSchema: z.ZodObject<{
|
|
|
8594
8594
|
"plain",
|
|
8595
8595
|
"S256"
|
|
8596
8596
|
]>>;
|
|
8597
|
+
redirect_uri: z.ZodOptional<z.ZodString>;
|
|
8597
8598
|
expires_at: z.ZodString;
|
|
8598
8599
|
used_at: z.ZodOptional<z.ZodString>;
|
|
8599
8600
|
user_id: z.ZodOptional<z.ZodString>;
|
|
@@ -8603,6 +8604,7 @@ export declare const codeInsertSchema: z.ZodObject<{
|
|
|
8603
8604
|
code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
|
|
8604
8605
|
expires_at: string;
|
|
8605
8606
|
user_id?: string | undefined;
|
|
8607
|
+
redirect_uri?: string | undefined;
|
|
8606
8608
|
code_challenge_method?: "S256" | "plain" | undefined;
|
|
8607
8609
|
code_challenge?: string | undefined;
|
|
8608
8610
|
connection_id?: string | undefined;
|
|
@@ -8614,6 +8616,7 @@ export declare const codeInsertSchema: z.ZodObject<{
|
|
|
8614
8616
|
code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
|
|
8615
8617
|
expires_at: string;
|
|
8616
8618
|
user_id?: string | undefined;
|
|
8619
|
+
redirect_uri?: string | undefined;
|
|
8617
8620
|
code_challenge_method?: "S256" | "plain" | undefined;
|
|
8618
8621
|
code_challenge?: string | undefined;
|
|
8619
8622
|
connection_id?: string | undefined;
|
|
@@ -8640,6 +8643,7 @@ export declare const codeSchema: z.ZodObject<{
|
|
|
8640
8643
|
"plain",
|
|
8641
8644
|
"S256"
|
|
8642
8645
|
]>>;
|
|
8646
|
+
redirect_uri: z.ZodOptional<z.ZodString>;
|
|
8643
8647
|
expires_at: z.ZodString;
|
|
8644
8648
|
used_at: z.ZodOptional<z.ZodString>;
|
|
8645
8649
|
user_id: z.ZodOptional<z.ZodString>;
|
|
@@ -8650,6 +8654,7 @@ export declare const codeSchema: z.ZodObject<{
|
|
|
8650
8654
|
code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
|
|
8651
8655
|
expires_at: string;
|
|
8652
8656
|
user_id?: string | undefined;
|
|
8657
|
+
redirect_uri?: string | undefined;
|
|
8653
8658
|
code_challenge_method?: "S256" | "plain" | undefined;
|
|
8654
8659
|
code_challenge?: string | undefined;
|
|
8655
8660
|
connection_id?: string | undefined;
|
|
@@ -8662,6 +8667,7 @@ export declare const codeSchema: z.ZodObject<{
|
|
|
8662
8667
|
code_type: "password_reset" | "email_verification" | "otp" | "authorization_code" | "oauth2_state" | "ticket";
|
|
8663
8668
|
expires_at: string;
|
|
8664
8669
|
user_id?: string | undefined;
|
|
8670
|
+
redirect_uri?: string | undefined;
|
|
8665
8671
|
code_challenge_method?: "S256" | "plain" | undefined;
|
|
8666
8672
|
code_challenge?: string | undefined;
|
|
8667
8673
|
connection_id?: string | undefined;
|
package/dist/authhero.mjs
CHANGED
|
@@ -1852,6 +1852,9 @@ const k1 = o.enum([
|
|
|
1852
1852
|
code_challenge_method: o.enum(["plain", "S256"]).optional().openapi({
|
|
1853
1853
|
description: "The code challenge method used in PKCE in outbound flows"
|
|
1854
1854
|
}),
|
|
1855
|
+
redirect_uri: o.string().optional().openapi({
|
|
1856
|
+
description: "The redirect URI associated with the code"
|
|
1857
|
+
}),
|
|
1855
1858
|
expires_at: o.string(),
|
|
1856
1859
|
used_at: o.string().optional(),
|
|
1857
1860
|
user_id: o.string().optional()
|
|
@@ -5979,7 +5982,8 @@ async function Fh(t, e) {
|
|
|
5979
5982
|
Date.now() + h_ * 1e3
|
|
5980
5983
|
).toISOString(),
|
|
5981
5984
|
code_challenge: e.authParams.code_challenge,
|
|
5982
|
-
code_challenge_method: e.authParams.code_challenge_method
|
|
5985
|
+
code_challenge_method: e.authParams.code_challenge_method,
|
|
5986
|
+
redirect_uri: e.authParams.redirect_uri
|
|
5983
5987
|
})).code_id,
|
|
5984
5988
|
state: e.authParams.state
|
|
5985
5989
|
};
|
|
@@ -6068,7 +6072,8 @@ async function Zt(t, e) {
|
|
|
6068
6072
|
code_type: "ticket",
|
|
6069
6073
|
login_id: e.loginSession.id,
|
|
6070
6074
|
expires_at: new Date(Date.now() + m_).toISOString(),
|
|
6071
|
-
code_verifier: [b, v].join("|")
|
|
6075
|
+
code_verifier: [b, v].join("|"),
|
|
6076
|
+
redirect_uri: n.redirect_uri
|
|
6072
6077
|
});
|
|
6073
6078
|
return t.json({
|
|
6074
6079
|
login_ticket: E.code_id,
|
|
@@ -19829,7 +19834,7 @@ async function pb(t, e) {
|
|
|
19829
19834
|
if (!os(a, r.code_challenge))
|
|
19830
19835
|
throw new A(403, { message: "Invalid client credentials" });
|
|
19831
19836
|
}
|
|
19832
|
-
if (
|
|
19837
|
+
if (r.redirect_uri && r.redirect_uri !== e.redirect_uri)
|
|
19833
19838
|
throw new A(403, { message: "Invalid redirect uri" });
|
|
19834
19839
|
const s = await t.env.data.users.get(n.tenant.id, r.user_id);
|
|
19835
19840
|
if (!s)
|
|
@@ -22277,7 +22282,8 @@ const A4 = new ae().openapi(
|
|
|
22277
22282
|
code_id: Dn(),
|
|
22278
22283
|
code_type: "otp",
|
|
22279
22284
|
login_id: m.id,
|
|
22280
|
-
expires_at: new Date(Date.now() + es).toISOString()
|
|
22285
|
+
expires_at: new Date(Date.now() + es).toISOString(),
|
|
22286
|
+
redirect_uri: s.redirect_uri
|
|
22281
22287
|
});
|
|
22282
22288
|
return i === "link" ? await Vl(t, {
|
|
22283
22289
|
to: d,
|
|
@@ -22696,7 +22702,8 @@ async function C4({
|
|
|
22696
22702
|
login_id: u.id,
|
|
22697
22703
|
expires_at: new Date(
|
|
22698
22704
|
Date.now() + Zr * 1e3
|
|
22699
|
-
).toISOString()
|
|
22705
|
+
).toISOString(),
|
|
22706
|
+
redirect_uri: r.redirect_uri
|
|
22700
22707
|
}), await Vl(t, {
|
|
22701
22708
|
code: f,
|
|
22702
22709
|
to: s,
|
|
@@ -24221,7 +24228,8 @@ const g$ = new ae().openapi(
|
|
|
24221
24228
|
code_id: u,
|
|
24222
24229
|
code_type: "otp",
|
|
24223
24230
|
login_id: s.id,
|
|
24224
|
-
expires_at: new Date(Date.now() + es).toISOString()
|
|
24231
|
+
expires_at: new Date(Date.now() + es).toISOString(),
|
|
24232
|
+
redirect_uri: s.authParams.redirect_uri
|
|
24225
24233
|
}), w = h$(
|
|
24226
24234
|
s.auth0Client
|
|
24227
24235
|
), { connection: h } = hi(d);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "authhero",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.152.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"vite": "^5.4.11",
|
|
37
37
|
"vite-plugin-dts": "^4.3.0",
|
|
38
38
|
"vitest": "^2.1.5",
|
|
39
|
-
"@authhero/kysely-adapter": "^10.
|
|
39
|
+
"@authhero/kysely-adapter": "^10.19.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@peculiar/x509": "^1.12.3",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"libphonenumber-js": "^1.12.8",
|
|
50
50
|
"nanoid": "^5.0.8",
|
|
51
51
|
"oslo": "^1.2.1",
|
|
52
|
-
"@authhero/adapter-interfaces": "^0.
|
|
52
|
+
"@authhero/adapter-interfaces": "^0.69.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@hono/zod-openapi": "^0.19.2",
|