authhero 0.230.0 → 0.231.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 +2 -2
- package/dist/authhero.mjs +6 -10
- package/package.json +1 -1
package/dist/authhero.mjs
CHANGED
|
@@ -22661,11 +22661,7 @@ function wf(t, e = [], n = {}) {
|
|
|
22661
22661
|
const r = new URL(t);
|
|
22662
22662
|
return e.some((i) => {
|
|
22663
22663
|
try {
|
|
22664
|
-
return a5(
|
|
22665
|
-
r,
|
|
22666
|
-
new URL(i),
|
|
22667
|
-
n
|
|
22668
|
-
);
|
|
22664
|
+
return a5(r, new URL(i), n);
|
|
22669
22665
|
} catch {
|
|
22670
22666
|
return !1;
|
|
22671
22667
|
}
|
|
@@ -22683,9 +22679,9 @@ function a5(t, e, n = {}) {
|
|
|
22683
22679
|
return !1;
|
|
22684
22680
|
} else if (t.pathname !== e.pathname)
|
|
22685
22681
|
return !1;
|
|
22686
|
-
if (n.
|
|
22682
|
+
if (n.allowSubDomainWildcards && e.hostname.startsWith("*.") && e.hostname.split(".").length > 2 && ["http:", "https:"].includes(e.protocol)) {
|
|
22687
22683
|
const r = e.hostname.split(".").slice(1).join(".");
|
|
22688
|
-
return t.hostname.endsWith(r);
|
|
22684
|
+
return t.hostname === r || t.hostname.endsWith("." + r);
|
|
22689
22685
|
}
|
|
22690
22686
|
return t.hostname === e.hostname;
|
|
22691
22687
|
}
|
|
@@ -22724,7 +22720,7 @@ const c5 = new be().openapi(
|
|
|
22724
22720
|
...r.allowed_logout_urls || [],
|
|
22725
22721
|
...(i == null ? void 0 : i.allowed_logout_urls) || []
|
|
22726
22722
|
],
|
|
22727
|
-
{ allowPathWildcards: !0,
|
|
22723
|
+
{ allowPathWildcards: !0, allowSubDomainWildcards: !0 }
|
|
22728
22724
|
))
|
|
22729
22725
|
throw new E(400, {
|
|
22730
22726
|
message: "Invalid redirect uri"
|
|
@@ -26371,7 +26367,7 @@ const BE = ["email", "sms", "Username-Password-Authentication"], LE = new be().o
|
|
|
26371
26367
|
const F = M.callbacks || [];
|
|
26372
26368
|
if (t.var.host && (F.push(`${pl(t.env)}/*`), F.push(`${ft(t.env)}/*`)), !wf(K.redirect_uri, F, {
|
|
26373
26369
|
allowPathWildcards: !0,
|
|
26374
|
-
|
|
26370
|
+
allowSubDomainWildcards: !0
|
|
26375
26371
|
}))
|
|
26376
26372
|
throw new E(400, {
|
|
26377
26373
|
message: `Invalid redirect URI - ${K.redirect_uri}`
|
|
@@ -26486,7 +26482,7 @@ const BE = ["email", "sms", "Username-Password-Authentication"], LE = new be().o
|
|
|
26486
26482
|
const A = a.callbacks || [];
|
|
26487
26483
|
if (t.var.host && (A.push(`${pl(t.env)}/*`), A.push(`${ft(t.env)}/*`)), !wf(l.redirect_uri, A, {
|
|
26488
26484
|
allowPathWildcards: !0,
|
|
26489
|
-
|
|
26485
|
+
allowSubDomainWildcards: !0
|
|
26490
26486
|
}))
|
|
26491
26487
|
throw new E(400, {
|
|
26492
26488
|
message: `Invalid redirect URI - ${l.redirect_uri}`
|