@passflow/core 0.35.0 → 0.35.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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +244 -233
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ var i = "__passflowAntiBot", a = (e, t) => {
|
|
|
11
11
|
if (typeof e != "object" || !e) return;
|
|
12
12
|
let t = e[i];
|
|
13
13
|
return typeof t == "object" && t ? t : void 0;
|
|
14
|
-
}, s = "0.35.
|
|
14
|
+
}, s = "0.35.1", c = "X-Passflow-Clientid", l = "Authorization", u = "X-Passflow-DeviceId", d = "X-Passflow-DeviceType", f = "X-Passflow-Anti-Bot", p = "X-Passflow-Agent-Tool", m = "passflow_auth", h = s, g = [
|
|
15
15
|
"id",
|
|
16
16
|
"offline",
|
|
17
17
|
"openid"
|
|
@@ -4054,7 +4054,18 @@ function Gi(e) {
|
|
|
4054
4054
|
return t.length > 64 || !/^[A-Z0-9-]+$/.test(t) || t.replace(/-/g, "") === "" ? null : t;
|
|
4055
4055
|
}
|
|
4056
4056
|
// lib/services/auth-service.ts
|
|
4057
|
-
var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow_pwless_pending", Xi = 3e3, Zi = "passflow_federated_pkce", Qi = 6e5, $i = "AppId is required for federated auth"
|
|
4057
|
+
var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow_pwless_pending", Xi = 3e3, Zi = "passflow_federated_pkce", Qi = 6e5, $i = "AppId is required for federated auth";
|
|
4058
|
+
function ea(e) {
|
|
4059
|
+
let t;
|
|
4060
|
+
try {
|
|
4061
|
+
t = new URL(e).protocol;
|
|
4062
|
+
} catch {
|
|
4063
|
+
t = void 0;
|
|
4064
|
+
}
|
|
4065
|
+
if (t !== "https:" && t !== "http:") throw Error("The federated start returned an address that is not http or https");
|
|
4066
|
+
return e;
|
|
4067
|
+
}
|
|
4068
|
+
var ta = 10, na = "The sign-in answered with a PKCE code, but its verifier is gone", ra = (e, t) => new Promise((n, r) => {
|
|
4058
4069
|
if (t?.aborted) {
|
|
4059
4070
|
r(t.reason);
|
|
4060
4071
|
return;
|
|
@@ -4065,19 +4076,19 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
4065
4076
|
t?.removeEventListener("abort", i), n();
|
|
4066
4077
|
}, e);
|
|
4067
4078
|
t?.addEventListener("abort", i, { once: !0 });
|
|
4068
|
-
}),
|
|
4079
|
+
}), ia = (e) => {
|
|
4069
4080
|
if (!e) return;
|
|
4070
4081
|
let t = new URLSearchParams(e.search).get("token");
|
|
4071
4082
|
if (t) return t;
|
|
4072
4083
|
let n = e.hash.indexOf("?");
|
|
4073
4084
|
return n < 0 ? void 0 : new URLSearchParams(e.hash.slice(n + 1)).get("token") ?? void 0;
|
|
4074
|
-
},
|
|
4085
|
+
}, aa = (e) => {
|
|
4075
4086
|
if (e) try {
|
|
4076
4087
|
return j(e).email;
|
|
4077
4088
|
} catch {
|
|
4078
4089
|
return;
|
|
4079
4090
|
}
|
|
4080
|
-
},
|
|
4091
|
+
}, oa = class {
|
|
4081
4092
|
constructor(e, t, n, r, i, a, o, s, c, l, u, d = R, f, p = { coordination: jr() }, m) {
|
|
4082
4093
|
this.authApi = e, this.deviceService = t, this.storageManager = n, this.subscribeStore = r, this.tokenCacheService = i, this.scopes = a, this.createTenantForNewUser = o, this.url = s, this.sessionCallbacks = c, this.appId = l, this.platform = d, this.readPkceEnabled = f, this.readAppSettings = m, this.emailChallenges = /* @__PURE__ */ new Map(), this.tokenExchangeConfig = u, this.tokenDeliveryManager = new ce(n), u?.enabled && this.tokenDeliveryManager.setMode(N.BFF), this.refresh = fi({
|
|
4083
4094
|
emit: this.createRefreshEmit(),
|
|
@@ -4160,7 +4171,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
4160
4171
|
rememberEmailChallenge(e, t) {
|
|
4161
4172
|
this.emailChallenges.delete(e), this.emailChallenges.set(e, t);
|
|
4162
4173
|
for (let e of this.emailChallenges.keys()) {
|
|
4163
|
-
if (this.emailChallenges.size <=
|
|
4174
|
+
if (this.emailChallenges.size <= ta) break;
|
|
4164
4175
|
this.emailChallenges.delete(e);
|
|
4165
4176
|
}
|
|
4166
4177
|
}
|
|
@@ -4247,7 +4258,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
4247
4258
|
}
|
|
4248
4259
|
async completePkceSignIn(e) {
|
|
4249
4260
|
let t = this.readPendingPkce();
|
|
4250
|
-
if (!t) throw Error(
|
|
4261
|
+
if (!t) throw Error(na);
|
|
4251
4262
|
let n = await this.authApi.pkceExchange(e, t.verifier);
|
|
4252
4263
|
return await this.processAuthResponse(n, t.scopes ?? this.scopes), n;
|
|
4253
4264
|
}
|
|
@@ -4420,7 +4431,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
4420
4431
|
if (i = !0, this.handlePendingSecondFactor(n, r?.email, r && { verifier: r.verifier }, r?.scopes)) return this.forgetPendingPasswordless(), n;
|
|
4421
4432
|
let a = n;
|
|
4422
4433
|
if (n.code) {
|
|
4423
|
-
if (!r) throw Error(
|
|
4434
|
+
if (!r) throw Error(na);
|
|
4424
4435
|
if (a = await this.authApi.pkceExchange(n.code, r.verifier), this.handlePendingSecondFactor(a)) return this.forgetPendingPasswordless(), {
|
|
4425
4436
|
...a,
|
|
4426
4437
|
redirect_url: n.redirect_url ?? ""
|
|
@@ -4452,11 +4463,11 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
4452
4463
|
let n = t?.signal;
|
|
4453
4464
|
try {
|
|
4454
4465
|
let t = this.readPendingPasswordless();
|
|
4455
|
-
if (t?.challengeId !== e) throw Error(
|
|
4466
|
+
if (t?.challengeId !== e) throw Error(na);
|
|
4456
4467
|
for (;;) {
|
|
4457
4468
|
if (n?.aborted) throw n.reason;
|
|
4458
4469
|
if (Date.now() >= t.expiresAt) return this.forgetPendingPasswordless(), { status: "expired" };
|
|
4459
|
-
if (this.readPendingPasswordless()?.challengeId !== e) throw Error(
|
|
4470
|
+
if (this.readPendingPasswordless()?.challengeId !== e) throw Error(na);
|
|
4460
4471
|
let r;
|
|
4461
4472
|
try {
|
|
4462
4473
|
r = await this.authApi.passwordlessStatus({
|
|
@@ -4474,7 +4485,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
4474
4485
|
status: "signed-in",
|
|
4475
4486
|
tokens: { redirect_url: r.redirect_url }
|
|
4476
4487
|
};
|
|
4477
|
-
await
|
|
4488
|
+
await ra(Xi, n);
|
|
4478
4489
|
}
|
|
4479
4490
|
} catch (e) {
|
|
4480
4491
|
if (n?.aborted && e === n.reason) throw e;
|
|
@@ -4543,14 +4554,14 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
4543
4554
|
let t = this.emailChallenges.get(e.challenge_id), n = t?.email;
|
|
4544
4555
|
try {
|
|
4545
4556
|
let r = t?.pkce === !1 ? void 0 : this.readPendingPkce();
|
|
4546
|
-
if (t?.pkce && !r) throw Error(
|
|
4557
|
+
if (t?.pkce && !r) throw Error(na);
|
|
4547
4558
|
let i = await this.authApi.validateEmailCode(e);
|
|
4548
4559
|
this.emailChallenges.delete(e.challenge_id);
|
|
4549
4560
|
let a = r?.scopes ?? t?.scopes ?? this.scopes;
|
|
4550
4561
|
if (this.handleEmailVerificationStep(i, t?.operation ?? "sign-in", n, r, a) || this.handlePendingSecondFactor(i, n, r, a)) return i;
|
|
4551
4562
|
let o = i;
|
|
4552
4563
|
if (i.code) {
|
|
4553
|
-
if (!r) throw Error(
|
|
4564
|
+
if (!r) throw Error(na);
|
|
4554
4565
|
if (o = await this.authApi.pkceExchange(i.code, r.verifier), this.handlePendingSecondFactor(o, n)) return o;
|
|
4555
4566
|
}
|
|
4556
4567
|
let s = i.redirect_url ? {
|
|
@@ -4753,10 +4764,10 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
4753
4764
|
}
|
|
4754
4765
|
async resetPassword(e, t, n) {
|
|
4755
4766
|
this.subscribeStore.notify(G.SignInStart, {});
|
|
4756
|
-
let r = n ??
|
|
4767
|
+
let r = n ?? ia(this.platform.getCurrentUrl()), i = t ?? this.scopes;
|
|
4757
4768
|
try {
|
|
4758
4769
|
let t = await this.startPkce(), n = t ? await this.authApi.resetPassword(e, i, r, t.challenge) : await this.authApi.resetPassword(e, i, r);
|
|
4759
|
-
if (this.handleEmailVerificationStep(n, "reset-password",
|
|
4770
|
+
if (this.handleEmailVerificationStep(n, "reset-password", aa(r), t, i) || this.handlePendingSecondFactor(n, void 0, t, i)) return n;
|
|
4760
4771
|
let a = await this.exchangeCode(n, t);
|
|
4761
4772
|
if (this.handlePendingSecondFactor(a)) return a;
|
|
4762
4773
|
let o = n.redirect_url ? {
|
|
@@ -4889,7 +4900,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
4889
4900
|
} : {}
|
|
4890
4901
|
};
|
|
4891
4902
|
return {
|
|
4892
|
-
url: await this.usesFederatedPost(t) ? (await this.authApi.federatedStart(e.provider, this.federatedStartBody(a, n), t)).auth_url : this.createFederatedAuthUrl(a),
|
|
4903
|
+
url: await this.usesFederatedPost(t) ? ea((await this.authApi.federatedStart(e.provider, this.federatedStartBody(a, n), t)).auth_url) : this.createFederatedAuthUrl(a),
|
|
4893
4904
|
pkce: i
|
|
4894
4905
|
};
|
|
4895
4906
|
})(), o, s = (e) => {
|
|
@@ -4952,7 +4963,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
4952
4963
|
code_challenge: i.challenge,
|
|
4953
4964
|
code_challenge_method: "S256"
|
|
4954
4965
|
} : {}
|
|
4955
|
-
}, o = await this.usesFederatedPost(t) ? (await this.authApi.federatedStart(e.provider, this.federatedStartBody(a, n), t)).auth_url : this.createFederatedAuthUrl(a);
|
|
4966
|
+
}, o = await this.usesFederatedPost(t) ? ea((await this.authApi.federatedStart(e.provider, this.federatedStartBody(a, n), t)).auth_url) : this.createFederatedAuthUrl(a);
|
|
4956
4967
|
i ? this.rememberFederatedSlot(i.verifier, n) : this.forgetFederatedSlot(), this.platform.navigateTo(o);
|
|
4957
4968
|
}).catch((e) => this.reportFederatedRedirectFailure(e));
|
|
4958
4969
|
}
|
|
@@ -5142,7 +5153,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
5142
5153
|
return;
|
|
5143
5154
|
}
|
|
5144
5155
|
}
|
|
5145
|
-
},
|
|
5156
|
+
}, sa = class {
|
|
5146
5157
|
constructor(e) {
|
|
5147
5158
|
this.invitationApi = e;
|
|
5148
5159
|
}
|
|
@@ -5161,7 +5172,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
5161
5172
|
getInvitationLink(e) {
|
|
5162
5173
|
return this.invitationApi.getInvitationLink(e);
|
|
5163
5174
|
}
|
|
5164
|
-
},
|
|
5175
|
+
}, ca = class {
|
|
5165
5176
|
constructor(e) {
|
|
5166
5177
|
this.data = this.normalize(e);
|
|
5167
5178
|
}
|
|
@@ -5218,7 +5229,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
5218
5229
|
getData() {
|
|
5219
5230
|
return this.data;
|
|
5220
5231
|
}
|
|
5221
|
-
},
|
|
5232
|
+
}, la = class {
|
|
5222
5233
|
constructor(e, t, n) {
|
|
5223
5234
|
this.tenantApi = e, this.scopes = t, this.logger = n || Pr();
|
|
5224
5235
|
}
|
|
@@ -5256,7 +5267,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
5256
5267
|
}
|
|
5257
5268
|
async getTenantUserMembership(e) {
|
|
5258
5269
|
try {
|
|
5259
|
-
return new
|
|
5270
|
+
return new ca(await this.tenantApi.getTenantDetails(e));
|
|
5260
5271
|
} catch (t) {
|
|
5261
5272
|
this.handlePassflowError(t, `Get tenant user membership failed for tenant ID ${e}`);
|
|
5262
5273
|
}
|
|
@@ -5401,7 +5412,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
5401
5412
|
this.handlePassflowError(r, `Invalidate invite by email failed for tenant ID ${e}, group ID ${t}, email ${n}`);
|
|
5402
5413
|
}
|
|
5403
5414
|
}
|
|
5404
|
-
},
|
|
5415
|
+
}, ua = class {
|
|
5405
5416
|
constructor(e, t, n, r = R) {
|
|
5406
5417
|
this.storageManager = e, this.subscribeStore = n, this.platform = r, this.checkInterval = null, this.CHECK_INTERVAL = 6e4, this.unsubscribeForeground = null, this.unsubscribeUnload = null, this.tokenExpiredFlag = !1, this.storageManager = e, this.setupLifecycleListeners();
|
|
5407
5418
|
}
|
|
@@ -5481,7 +5492,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
5481
5492
|
isExpired() {
|
|
5482
5493
|
return this.tokensCache ? this.tokensCache.access_token ? A(j(this.tokensCache.access_token)) : !1 : !0;
|
|
5483
5494
|
}
|
|
5484
|
-
},
|
|
5495
|
+
}, da = class {
|
|
5485
5496
|
constructor(e, t, n) {
|
|
5486
5497
|
this.twoFactorApi = e, this.subscribeStore = t, this.signInCompleter = n, this.PARTIAL_AUTH_TIMEOUT_MS = 3e5, this.SESSION_STORAGE_KEY = "passflow_2fa_challenge", this.subscribeStore.subscribe({ onAuthChange: (e, t) => {
|
|
5487
5498
|
if (e === G.TwoFactorRequired) {
|
|
@@ -5812,7 +5823,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
5812
5823
|
this.emitErrorAndThrow(e, "2fa.trusted-devices.revoke", "Revoke trusted device");
|
|
5813
5824
|
}
|
|
5814
5825
|
}
|
|
5815
|
-
},
|
|
5826
|
+
}, fa = class {
|
|
5816
5827
|
constructor(e, t, n = R) {
|
|
5817
5828
|
this.userAPI = e, this.deviceService = t, this.platform = n;
|
|
5818
5829
|
}
|
|
@@ -5848,77 +5859,77 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
5848
5859
|
signOutOtherSessions() {
|
|
5849
5860
|
return this.userAPI.revokeOtherUserSessions();
|
|
5850
5861
|
}
|
|
5851
|
-
},
|
|
5862
|
+
}, pa = class extends Error {
|
|
5852
5863
|
constructor(e, t, n = !1) {
|
|
5853
5864
|
super(t), this.name = "UpgradeFactorError", this.factor = e, this.cancelled = n;
|
|
5854
5865
|
}
|
|
5855
|
-
},
|
|
5866
|
+
}, ma = (e, t) => {
|
|
5856
5867
|
let n = t?.trim();
|
|
5857
|
-
if (!n) throw new
|
|
5868
|
+
if (!n) throw new pa(e, "A verification code is required");
|
|
5858
5869
|
return n;
|
|
5859
|
-
},
|
|
5870
|
+
}, ha = {
|
|
5860
5871
|
type: "totp",
|
|
5861
5872
|
requiresPrepare: !1,
|
|
5862
5873
|
input: "code",
|
|
5863
|
-
assert: async ({ code: e }) => ({ code:
|
|
5864
|
-
},
|
|
5874
|
+
assert: async ({ code: e }) => ({ code: ma("totp", e) })
|
|
5875
|
+
}, ga = {
|
|
5865
5876
|
type: "recovery_codes",
|
|
5866
5877
|
requiresPrepare: !1,
|
|
5867
5878
|
input: "code",
|
|
5868
|
-
assert: async ({ code: e }) => ({ code:
|
|
5869
|
-
},
|
|
5879
|
+
assert: async ({ code: e }) => ({ code: ma("recovery_codes", e) })
|
|
5880
|
+
}, _a = {
|
|
5870
5881
|
type: "passkey",
|
|
5871
5882
|
requiresPrepare: !0,
|
|
5872
5883
|
input: "none",
|
|
5873
5884
|
assert: async ({ prepared: e, platform: t }) => {
|
|
5874
|
-
if (!e?.webauthn) throw new
|
|
5885
|
+
if (!e?.webauthn) throw new pa("passkey", "The upgrade challenge carried no WebAuthn options");
|
|
5875
5886
|
let n = t.passkeys;
|
|
5876
|
-
if (!n) throw new
|
|
5887
|
+
if (!n) throw new pa("passkey", "This platform does not support passkeys");
|
|
5877
5888
|
let r;
|
|
5878
5889
|
try {
|
|
5879
5890
|
r = await n.startAuthentication(e.webauthn);
|
|
5880
5891
|
} catch (e) {
|
|
5881
|
-
throw new
|
|
5892
|
+
throw new pa("passkey", e?.message || "Passkey verification was cancelled", !0);
|
|
5882
5893
|
}
|
|
5883
|
-
if (!r) throw new
|
|
5894
|
+
if (!r) throw new pa("passkey", "Passkey verification was cancelled", !0);
|
|
5884
5895
|
return {
|
|
5885
5896
|
challenge_id: e.challengeId,
|
|
5886
5897
|
credential: r
|
|
5887
5898
|
};
|
|
5888
5899
|
}
|
|
5889
|
-
},
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
]),
|
|
5900
|
+
}, va = Object.freeze([
|
|
5901
|
+
ha,
|
|
5902
|
+
_a,
|
|
5903
|
+
ga
|
|
5904
|
+
]), ya = (e = va) => new Map(e.map((e) => [e.type, e])), ba = 3, xa = {
|
|
5894
5905
|
totp: 0,
|
|
5895
5906
|
passkey: 1,
|
|
5896
5907
|
email_otp: 2,
|
|
5897
5908
|
sms_otp: 3,
|
|
5898
5909
|
recovery_codes: 9
|
|
5899
|
-
},
|
|
5900
|
-
let n =
|
|
5910
|
+
}, Sa = (e) => e.requiredLevel ?? _e(e.acrValues), Ca = (e, t) => {
|
|
5911
|
+
let n = xa[e.type] ?? 5, r = t !== void 0 && t >= ba, i = e.type === "passkey";
|
|
5901
5912
|
return (r && !i ? 100 : 0) + n;
|
|
5902
|
-
},
|
|
5913
|
+
}, wa = (e, t) => {
|
|
5903
5914
|
if (t.availableFactors) return t.availableFactors.flatMap((t) => e.find((e) => e.type === t) ?? []);
|
|
5904
|
-
let n =
|
|
5905
|
-
return [...e].sort((e, t) =>
|
|
5906
|
-
},
|
|
5915
|
+
let n = Sa(t);
|
|
5916
|
+
return [...e].sort((e, t) => Ca(e, n) - Ca(t, n));
|
|
5917
|
+
}, Ta = class extends Error {
|
|
5907
5918
|
constructor(e) {
|
|
5908
5919
|
super("Upgrade authentication was cancelled"), this.code = "upgrade_cancelled", this.name = "UpgradeCancelledError", e !== void 0 && (this.cause = e);
|
|
5909
5920
|
}
|
|
5910
|
-
},
|
|
5921
|
+
}, Ea = class extends Error {
|
|
5911
5922
|
constructor(e = "Only a fresh sign-in can meet this challenge") {
|
|
5912
5923
|
super(e), this.code = "upgrade_sign_in_required", this.name = "UpgradeSignInRequiredError";
|
|
5913
5924
|
}
|
|
5914
|
-
},
|
|
5915
|
-
if (
|
|
5916
|
-
if (
|
|
5917
|
-
},
|
|
5925
|
+
}, Da = (e) => e?.signInRequired === !0 || e?.signInRequired === void 0 && e?.availableFactors?.length === 0, Oa = (e) => e?.signInRequired === !1 && e.availableFactors?.length === 0, ka = "This account has no factor that reaches the required level (it may need a device-bound passkey)", Aa = (e) => {
|
|
5926
|
+
if (Da(e)) return new Ea();
|
|
5927
|
+
if (Oa(e)) return new ja(ka);
|
|
5928
|
+
}, ja = class extends Error {
|
|
5918
5929
|
constructor(e = "No available authentication factor can satisfy this challenge") {
|
|
5919
5930
|
super(e), this.code = "upgrade_unsatisfiable", this.name = "UpgradeUnsatisfiableError";
|
|
5920
5931
|
}
|
|
5921
|
-
},
|
|
5932
|
+
}, Ma = 4, Na = 3e4, Pa = () => {
|
|
5922
5933
|
let e = () => void 0, t = () => void 0;
|
|
5923
5934
|
return {
|
|
5924
5935
|
promise: new Promise((n, r) => {
|
|
@@ -5927,12 +5938,12 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
5927
5938
|
resolve: e,
|
|
5928
5939
|
reject: t
|
|
5929
5940
|
};
|
|
5930
|
-
},
|
|
5941
|
+
}, Fa = (e) => ({
|
|
5931
5942
|
acrValues: e.acrValues,
|
|
5932
5943
|
level: e.requiredLevel,
|
|
5933
5944
|
maxAge: e.maxAge
|
|
5934
|
-
}),
|
|
5935
|
-
let n = e.requiredLevel === void 0 ? t.requiredLevel : t.requiredLevel === void 0 ? e.requiredLevel : Math.max(e.requiredLevel, t.requiredLevel), r = n === void 0 ? e.acrValues ?? t.acrValues : n === e.requiredLevel ? e.acrValues : t.acrValues, i = e.maxAge === void 0 ? t.maxAge : t.maxAge === void 0 ? e.maxAge : Math.min(e.maxAge, t.maxAge), a = Array.from(/* @__PURE__ */ new Set([...e.channels ?? [], ...t.channels ?? []])), { availableFactors: o, signInRequired: s } =
|
|
5945
|
+
}), Ia = (e, t) => t.level === void 0 || e.level !== void 0 && e.level >= t.level, La = (e, t) => {
|
|
5946
|
+
let n = e.requiredLevel === void 0 ? t.requiredLevel : t.requiredLevel === void 0 ? e.requiredLevel : Math.max(e.requiredLevel, t.requiredLevel), r = n === void 0 ? e.acrValues ?? t.acrValues : n === e.requiredLevel ? e.acrValues : t.acrValues, i = e.maxAge === void 0 ? t.maxAge : t.maxAge === void 0 ? e.maxAge : Math.min(e.maxAge, t.maxAge), a = Array.from(/* @__PURE__ */ new Set([...e.channels ?? [], ...t.channels ?? []])), { availableFactors: o, signInRequired: s } = Ra(t, e) && !Ra(e, t) || !t.availableFactors ? e : t;
|
|
5936
5947
|
return {
|
|
5937
5948
|
acrValues: r,
|
|
5938
5949
|
requiredLevel: n,
|
|
@@ -5942,12 +5953,12 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
5942
5953
|
...o ? { availableFactors: o } : {},
|
|
5943
5954
|
...s === void 0 ? {} : { signInRequired: s }
|
|
5944
5955
|
};
|
|
5945
|
-
},
|
|
5956
|
+
}, Ra = (e, t) => {
|
|
5946
5957
|
let n = t.requiredLevel !== void 0 && (e.requiredLevel === void 0 || t.requiredLevel > e.requiredLevel), r = t.maxAge !== void 0 && (e.maxAge === void 0 || t.maxAge < e.maxAge);
|
|
5947
5958
|
return n || r;
|
|
5948
|
-
},
|
|
5959
|
+
}, za = class {
|
|
5949
5960
|
constructor(e) {
|
|
5950
|
-
this.state = "idle", this.inFlight = null, this.requirement = null, this.selected = null, this.rankedRequirement = null, this.registrations = [], this.proof = null, this.pruned = /* @__PURE__ */ new Set(), this.openPrompt = null, this.transport = e.transport, this.prompt = e.prompt, this.platform = e.platform, this.available = e.factors ??
|
|
5961
|
+
this.state = "idle", this.inFlight = null, this.requirement = null, this.selected = null, this.rankedRequirement = null, this.registrations = [], this.proof = null, this.pruned = /* @__PURE__ */ new Set(), this.openPrompt = null, this.transport = e.transport, this.prompt = e.prompt, this.platform = e.platform, this.available = e.factors ?? va, this.registry = ya(this.available), this.maxAttempts = e.maxAttempts ?? Ma, this.readObtainedBar = e.readObtainedBar, this.onFlightSettled = e.onFlightSettled, this.settleTimeoutMs = e.replaySettleTimeoutMs ?? Na;
|
|
5951
5962
|
}
|
|
5952
5963
|
get currentState() {
|
|
5953
5964
|
return this.state;
|
|
@@ -5967,9 +5978,9 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
5967
5978
|
}
|
|
5968
5979
|
register(e, t) {
|
|
5969
5980
|
let n = t.kind === "imperative" && t.requested !== void 0, r = {
|
|
5970
|
-
demanded: t.kind === "imperative" && t.requested ? t.requested :
|
|
5981
|
+
demanded: t.kind === "imperative" && t.requested ? t.requested : Fa(e),
|
|
5971
5982
|
statedBar: n,
|
|
5972
|
-
settlement:
|
|
5983
|
+
settlement: Pa(),
|
|
5973
5984
|
reported: !1,
|
|
5974
5985
|
entry: {
|
|
5975
5986
|
...t,
|
|
@@ -5985,15 +5996,15 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
5985
5996
|
this.requirement = e;
|
|
5986
5997
|
return;
|
|
5987
5998
|
}
|
|
5988
|
-
let n =
|
|
5989
|
-
this.requirement =
|
|
5999
|
+
let n = Ra(t, e);
|
|
6000
|
+
this.requirement = La(t, e), Aa(this.requirement) ? this.state === "collecting" && this.selected === null && (this.openPrompt?.onClosed?.(), this.closeOpenPrompt?.()) : n && this.state === "collecting" && this.selected === null && this.openPrompt?.onRequirementRaised?.({
|
|
5990
6001
|
challenge: this.requirement,
|
|
5991
6002
|
factors: this.offeredFactors()
|
|
5992
6003
|
});
|
|
5993
6004
|
}
|
|
5994
6005
|
offeredFactors() {
|
|
5995
6006
|
let e = this.available.filter((e) => !this.pruned.has(e.type)), t = this.requirement;
|
|
5996
|
-
return t ?
|
|
6007
|
+
return t ? wa(e, t) : e;
|
|
5997
6008
|
}
|
|
5998
6009
|
receiveReport(e, t) {
|
|
5999
6010
|
e.reported || (e.reported = !0, e.entry.outcome = t.outcome, t.obtained && (e.entry.obtained = t.obtained), t.required && (e.entry.required = t.required), this.notifyReportsSettled());
|
|
@@ -6028,7 +6039,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6028
6039
|
}
|
|
6029
6040
|
release(e, t) {
|
|
6030
6041
|
if (e.entry.kind === "imperative") {
|
|
6031
|
-
if (e.statedBar && !
|
|
6042
|
+
if (e.statedBar && !Ia(t, e.demanded)) {
|
|
6032
6043
|
this.receiveReport(e, {
|
|
6033
6044
|
outcome: "insufficient",
|
|
6034
6045
|
obtained: t,
|
|
@@ -6103,7 +6114,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6103
6114
|
async prove() {
|
|
6104
6115
|
let e;
|
|
6105
6116
|
for (let t = 0; t < this.maxAttempts; t++) {
|
|
6106
|
-
let t =
|
|
6117
|
+
let t = Aa(this.requirement);
|
|
6107
6118
|
if (t) return {
|
|
6108
6119
|
status: "failed",
|
|
6109
6120
|
reason: t
|
|
@@ -6111,7 +6122,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6111
6122
|
let n = this.offeredFactors();
|
|
6112
6123
|
if (n.length === 0) return {
|
|
6113
6124
|
status: "failed",
|
|
6114
|
-
reason: new
|
|
6125
|
+
reason: new ja()
|
|
6115
6126
|
};
|
|
6116
6127
|
let r = this.requirement, i;
|
|
6117
6128
|
try {
|
|
@@ -6119,29 +6130,29 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6119
6130
|
} catch (e) {
|
|
6120
6131
|
return {
|
|
6121
6132
|
status: "failed",
|
|
6122
|
-
reason: new
|
|
6133
|
+
reason: new Ta(e)
|
|
6123
6134
|
};
|
|
6124
6135
|
}
|
|
6125
|
-
let a =
|
|
6136
|
+
let a = Aa(this.requirement);
|
|
6126
6137
|
if (a) return {
|
|
6127
6138
|
status: "failed",
|
|
6128
6139
|
reason: a
|
|
6129
6140
|
};
|
|
6130
6141
|
if (i.type === "cancel") return {
|
|
6131
6142
|
status: "failed",
|
|
6132
|
-
reason: new
|
|
6143
|
+
reason: new Ta()
|
|
6133
6144
|
};
|
|
6134
6145
|
let o = this.registry.get(i.factor);
|
|
6135
|
-
if (!o) e = new
|
|
6146
|
+
if (!o) e = new ja(`Unknown authentication factor: ${i.factor}`), this.state = "collecting", this.selected = null;
|
|
6136
6147
|
else try {
|
|
6137
6148
|
return await this.proveAndCommit(o, i.code), {
|
|
6138
6149
|
status: "proven",
|
|
6139
|
-
obtained: this.readObtainedBar?.() ??
|
|
6150
|
+
obtained: this.readObtainedBar?.() ?? Fa(this.rankedRequirement ?? r)
|
|
6140
6151
|
};
|
|
6141
6152
|
} catch (t) {
|
|
6142
|
-
if (t instanceof
|
|
6153
|
+
if (t instanceof pa && t.cancelled) return {
|
|
6143
6154
|
status: "failed",
|
|
6144
|
-
reason: new
|
|
6155
|
+
reason: new Ta()
|
|
6145
6156
|
};
|
|
6146
6157
|
let n = this.classifyProofFailure(t);
|
|
6147
6158
|
if (n) return {
|
|
@@ -6198,28 +6209,28 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6198
6209
|
});
|
|
6199
6210
|
await this.transport.commit(e.type, r);
|
|
6200
6211
|
}
|
|
6201
|
-
},
|
|
6212
|
+
}, Ba = (e) => typeof e == "function" ? e() : e, Va = (e) => {
|
|
6202
6213
|
try {
|
|
6203
6214
|
return new URL(e);
|
|
6204
6215
|
} catch {
|
|
6205
6216
|
return;
|
|
6206
6217
|
}
|
|
6207
|
-
},
|
|
6218
|
+
}, Ha = (e, t) => {
|
|
6208
6219
|
if (!t || t === "/") return !0;
|
|
6209
6220
|
let n = t.replace(/\/+$/, "");
|
|
6210
6221
|
return e === n || e.startsWith(`${n}/`);
|
|
6211
|
-
},
|
|
6222
|
+
}, Ua = (e, t) => !t || e.origin === void 0 ? !1 : e.origin === t.origin && Ha(e.pathname, t.pathPrefix), Wa = (e, t) => {
|
|
6212
6223
|
for (let n of t) {
|
|
6213
6224
|
if (n === "") continue;
|
|
6214
6225
|
if (n.startsWith("/")) {
|
|
6215
|
-
if (e.relativeToBase &&
|
|
6226
|
+
if (e.relativeToBase && Ha(e.pathname, n)) return !0;
|
|
6216
6227
|
continue;
|
|
6217
6228
|
}
|
|
6218
|
-
let t =
|
|
6219
|
-
if (t && e.origin !== void 0 && e.origin === t.origin &&
|
|
6229
|
+
let t = Va(n) ?? Va(`https://${n}`);
|
|
6230
|
+
if (t && e.origin !== void 0 && e.origin === t.origin && Ha(e.pathname, t.pathname)) return !0;
|
|
6220
6231
|
}
|
|
6221
6232
|
return !1;
|
|
6222
|
-
},
|
|
6233
|
+
}, Ga = (e, t, n) => Ua(e, t.passflow) || Wa(e, t.backend) ? !n || n(e.href) !== !1 : !1, Ka = (e) => {
|
|
6223
6234
|
let t = e.detail, n = t?.message ?? `[passflow] upgrade challenge not actioned: ${e.reason}`;
|
|
6224
6235
|
console.warn(n, {
|
|
6225
6236
|
status: e.status,
|
|
@@ -6227,8 +6238,8 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6227
6238
|
reason: e.reason,
|
|
6228
6239
|
detail: t
|
|
6229
6240
|
});
|
|
6230
|
-
},
|
|
6231
|
-
let n = t.onUpgradeDiagnostic ??
|
|
6241
|
+
}, qa = (e, t) => {
|
|
6242
|
+
let n = t.onUpgradeDiagnostic ?? Ka;
|
|
6232
6243
|
return (t, r) => {
|
|
6233
6244
|
n({
|
|
6234
6245
|
status: e.status,
|
|
@@ -6240,8 +6251,8 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6240
6251
|
}
|
|
6241
6252
|
});
|
|
6242
6253
|
};
|
|
6243
|
-
},
|
|
6244
|
-
let r = n.onUpgradeDiagnostic ??
|
|
6254
|
+
}, Ja = (e, t, n) => {
|
|
6255
|
+
let r = n.onUpgradeDiagnostic ?? Ka;
|
|
6245
6256
|
for (let n of e) r({
|
|
6246
6257
|
...n,
|
|
6247
6258
|
url: t.request.href,
|
|
@@ -6250,8 +6261,8 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6250
6261
|
...n.detail ?? {}
|
|
6251
6262
|
}
|
|
6252
6263
|
});
|
|
6253
|
-
},
|
|
6254
|
-
let n = t.requireChallengeChannel === "header", r = e.getHeader("content-type") ?? "", i = !n &&
|
|
6264
|
+
}, Ya = /\bjson\b/i, Xa = async (e, t) => {
|
|
6265
|
+
let n = t.requireChallengeChannel === "header", r = e.getHeader("content-type") ?? "", i = !n && Ya.test(r), a;
|
|
6255
6266
|
if (i) try {
|
|
6256
6267
|
a = await e.readBody();
|
|
6257
6268
|
} catch {
|
|
@@ -6265,10 +6276,10 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6265
6276
|
status: e.status,
|
|
6266
6277
|
getHeader: (t) => e.getHeader(t) ?? void 0
|
|
6267
6278
|
}, { requireChallengeChannel: t.requireChallengeChannel });
|
|
6268
|
-
},
|
|
6279
|
+
}, Za = (e) => ke({
|
|
6269
6280
|
status: e.status,
|
|
6270
6281
|
getHeader: (t) => e.getHeader(t) ?? void 0
|
|
6271
|
-
}, { requireChallengeChannel: "header" }).challenge,
|
|
6282
|
+
}, { requireChallengeChannel: "header" }).challenge, Qa = (e, t) => t.passflow === null ? `[passflow] a 401/403 from ${e} carried an upgrade challenge, but no Passflow endpoint is configured — set \`url\` on the Passflow config.` : `[passflow] a 401/403 from ${e} carried an upgrade challenge, but that URL is not covered by the provider's \`backend\` prop — add it there to enable step-up for this API.`, $a = (e, t) => e instanceof Ta ? { kind: "cancelled" } : e instanceof Ea ? { kind: "sign-in-required" } : e instanceof ja ? {
|
|
6272
6283
|
kind: "unsatisfiable",
|
|
6273
6284
|
error: e
|
|
6274
6285
|
} : e instanceof Fi ? { kind: "unavailable" } : e instanceof Ii ? { kind: "session-changed" } : e instanceof Pi ? {
|
|
@@ -6287,26 +6298,26 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6287
6298
|
kind: "transport-failure",
|
|
6288
6299
|
retryable: !1,
|
|
6289
6300
|
error: e instanceof Error ? e : Error(String(e))
|
|
6290
|
-
},
|
|
6301
|
+
}, eo = async (e, t, n, r) => {
|
|
6291
6302
|
if (e.status !== 401 && e.status !== 403) return {
|
|
6292
6303
|
kind: "replayed",
|
|
6293
6304
|
response: e
|
|
6294
6305
|
};
|
|
6295
|
-
let { challenge: i, diagnostics: a } = await
|
|
6296
|
-
if (
|
|
6306
|
+
let { challenge: i, diagnostics: a } = await Xa(e, t);
|
|
6307
|
+
if (Ja(a, e, t), !i) return {
|
|
6297
6308
|
kind: "replayed",
|
|
6298
6309
|
response: e
|
|
6299
6310
|
};
|
|
6300
|
-
if (
|
|
6311
|
+
if (Da(i)) return {
|
|
6301
6312
|
kind: "sign-in-required",
|
|
6302
6313
|
response: e
|
|
6303
6314
|
};
|
|
6304
|
-
if (
|
|
6315
|
+
if (Oa(i)) return {
|
|
6305
6316
|
kind: "unsatisfiable",
|
|
6306
|
-
error:
|
|
6317
|
+
error: Aa(i),
|
|
6307
6318
|
response: e
|
|
6308
6319
|
};
|
|
6309
|
-
let o =
|
|
6320
|
+
let o = Fa(i);
|
|
6310
6321
|
return r("elevated-insufficient", {
|
|
6311
6322
|
obtained: n,
|
|
6312
6323
|
required: o
|
|
@@ -6316,7 +6327,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6316
6327
|
required: o,
|
|
6317
6328
|
response: e
|
|
6318
6329
|
};
|
|
6319
|
-
},
|
|
6330
|
+
}, to = async (e, t) => {
|
|
6320
6331
|
if (!t) return {
|
|
6321
6332
|
aborted: !1,
|
|
6322
6333
|
value: await e
|
|
@@ -6343,14 +6354,14 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6343
6354
|
} finally {
|
|
6344
6355
|
n && t.removeEventListener?.("abort", n);
|
|
6345
6356
|
}
|
|
6346
|
-
},
|
|
6357
|
+
}, no = async (e, t) => {
|
|
6347
6358
|
if (e.status !== 401 && e.status !== 403 || e.markers.upgradeTransaction) return { kind: "not-a-challenge" };
|
|
6348
|
-
let n =
|
|
6359
|
+
let n = qa(e, t);
|
|
6349
6360
|
if (e.markers.replayed) {
|
|
6350
|
-
if (!
|
|
6351
|
-
let { challenge: r, diagnostics: i } = await
|
|
6352
|
-
if (
|
|
6353
|
-
let a = t.readObtainedBar?.() ?? {}, o =
|
|
6361
|
+
if (!Ga(e.request, t.scope, t.shouldIntercept)) return { kind: "not-a-challenge" };
|
|
6362
|
+
let { challenge: r, diagnostics: i } = await Xa(e, t);
|
|
6363
|
+
if (Ja(i, e, t), !r) return { kind: "not-a-challenge" };
|
|
6364
|
+
let a = t.readObtainedBar?.() ?? {}, o = Fa(r);
|
|
6354
6365
|
return n("elevated-insufficient", {
|
|
6355
6366
|
obtained: a,
|
|
6356
6367
|
required: o
|
|
@@ -6361,12 +6372,12 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6361
6372
|
response: e
|
|
6362
6373
|
};
|
|
6363
6374
|
}
|
|
6364
|
-
if (!
|
|
6375
|
+
if (!Ga(e.request, t.scope, t.shouldIntercept)) return Za(e) ? (n("challenge-out-of-scope", {
|
|
6365
6376
|
header: e.getHeader("www-authenticate") ?? void 0,
|
|
6366
|
-
message:
|
|
6377
|
+
message: Qa(e.request.href, t.scope)
|
|
6367
6378
|
}), { kind: "out-of-scope" }) : { kind: "not-a-challenge" };
|
|
6368
|
-
let { challenge: r, diagnostics: i } = await
|
|
6369
|
-
if (
|
|
6379
|
+
let { challenge: r, diagnostics: i } = await Xa(e, t);
|
|
6380
|
+
if (Ja(i, e, t), !r) {
|
|
6370
6381
|
let r = e.getHeader("www-authenticate");
|
|
6371
6382
|
return t.requireChallengeChannel !== "header" && n("no-channel", {
|
|
6372
6383
|
...r ? { header: r } : {},
|
|
@@ -6380,9 +6391,9 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6380
6391
|
method: e.request.method
|
|
6381
6392
|
}, s, c;
|
|
6382
6393
|
try {
|
|
6383
|
-
s = Promise.resolve(t.elevate(r, o)), c = await
|
|
6394
|
+
s = Promise.resolve(t.elevate(r, o)), c = await to(s, e.signal);
|
|
6384
6395
|
} catch (e) {
|
|
6385
|
-
return
|
|
6396
|
+
return $a(e, void 0);
|
|
6386
6397
|
}
|
|
6387
6398
|
if (c.aborted) return s?.then((e) => e?.waiter.report({ outcome: "failed" }), () => {}), {
|
|
6388
6399
|
kind: "aborted",
|
|
@@ -6393,7 +6404,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6393
6404
|
kind: "aborted",
|
|
6394
6405
|
reason: e.signal.reason
|
|
6395
6406
|
};
|
|
6396
|
-
let u = l?.obtained ?? t.readObtainedBar?.() ??
|
|
6407
|
+
let u = l?.obtained ?? t.readObtainedBar?.() ?? Fa(r), d = t.authorizationSwap?.(), f = d ? {
|
|
6397
6408
|
from: a?.from ?? d.from,
|
|
6398
6409
|
to: d.to
|
|
6399
6410
|
} : void 0;
|
|
@@ -6420,7 +6431,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6420
6431
|
};
|
|
6421
6432
|
throw t;
|
|
6422
6433
|
}
|
|
6423
|
-
let m = await
|
|
6434
|
+
let m = await eo(p, t, u, n);
|
|
6424
6435
|
return m.kind === "insufficient" ? l?.waiter.report({
|
|
6425
6436
|
outcome: "insufficient",
|
|
6426
6437
|
obtained: m.obtained,
|
|
@@ -6429,11 +6440,11 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6429
6440
|
outcome: "replayed",
|
|
6430
6441
|
obtained: u
|
|
6431
6442
|
}), m;
|
|
6432
|
-
},
|
|
6443
|
+
}, ro = (e) => {
|
|
6433
6444
|
switch (e.kind) {
|
|
6434
|
-
case "cancelled": return new
|
|
6435
|
-
case "unsatisfiable": return e.error ?? new
|
|
6436
|
-
case "sign-in-required": return new
|
|
6445
|
+
case "cancelled": return new Ta();
|
|
6446
|
+
case "unsatisfiable": return e.error ?? new ja();
|
|
6447
|
+
case "sign-in-required": return new Ea();
|
|
6437
6448
|
case "unavailable": return new Fi();
|
|
6438
6449
|
case "session-changed": return new Ii();
|
|
6439
6450
|
case "insufficient": return new Pi(e.obtained, e.required);
|
|
@@ -6441,7 +6452,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6441
6452
|
case "transport-failure": return e.error;
|
|
6442
6453
|
default: return;
|
|
6443
6454
|
}
|
|
6444
|
-
},
|
|
6455
|
+
}, io = (e, t, n) => {
|
|
6445
6456
|
switch (e.kind) {
|
|
6446
6457
|
case "replayed": return {
|
|
6447
6458
|
settle: "resolve",
|
|
@@ -6459,26 +6470,26 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6459
6470
|
};
|
|
6460
6471
|
case "cancelled": return n.onCancel === "reject" ? {
|
|
6461
6472
|
settle: "reject",
|
|
6462
|
-
error: new
|
|
6473
|
+
error: new Ta()
|
|
6463
6474
|
} : {
|
|
6464
6475
|
settle: "resolve",
|
|
6465
|
-
value:
|
|
6476
|
+
value: ho(t, e)
|
|
6466
6477
|
};
|
|
6467
6478
|
case "unsatisfiable":
|
|
6468
6479
|
case "sign-in-required": return {
|
|
6469
6480
|
settle: "resolve",
|
|
6470
|
-
value:
|
|
6481
|
+
value: ho(e.response?.raw ?? t, e)
|
|
6471
6482
|
};
|
|
6472
6483
|
case "insufficient": return {
|
|
6473
6484
|
settle: "resolve",
|
|
6474
|
-
value:
|
|
6485
|
+
value: ho(e.response?.raw ?? t, e)
|
|
6475
6486
|
};
|
|
6476
6487
|
default: return {
|
|
6477
6488
|
settle: "resolve",
|
|
6478
|
-
value:
|
|
6489
|
+
value: ho(t, e)
|
|
6479
6490
|
};
|
|
6480
6491
|
}
|
|
6481
|
-
},
|
|
6492
|
+
}, ao = (e, t) => {
|
|
6482
6493
|
switch (e.kind) {
|
|
6483
6494
|
case "replayed": return e.response.rejected ? {
|
|
6484
6495
|
settle: "reject",
|
|
@@ -6493,42 +6504,42 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6493
6504
|
};
|
|
6494
6505
|
default: return {
|
|
6495
6506
|
settle: "reject",
|
|
6496
|
-
error:
|
|
6507
|
+
error: ro(e) ?? t
|
|
6497
6508
|
};
|
|
6498
6509
|
}
|
|
6499
|
-
},
|
|
6510
|
+
}, oo = /* @__PURE__ */ new WeakSet(), so = /* @__PURE__ */ new WeakSet(), co = /* @__PURE__ */ new WeakSet(), lo = /* @__PURE__ */ new WeakSet(), uo = /* @__PURE__ */ new WeakSet(), fo = /* @__PURE__ */ new WeakSet(), po = /* @__PURE__ */ new WeakSet(), mo = /* @__PURE__ */ new WeakSet(), ho = (e, t) => {
|
|
6500
6511
|
switch (t.kind) {
|
|
6501
6512
|
case "cancelled":
|
|
6502
|
-
|
|
6513
|
+
oo.add(e);
|
|
6503
6514
|
break;
|
|
6504
6515
|
case "exhausted":
|
|
6505
|
-
|
|
6516
|
+
so.add(e);
|
|
6506
6517
|
break;
|
|
6507
6518
|
case "insufficient":
|
|
6508
|
-
|
|
6519
|
+
co.add(e);
|
|
6509
6520
|
break;
|
|
6510
6521
|
case "unsatisfiable":
|
|
6511
|
-
|
|
6522
|
+
lo.add(e);
|
|
6512
6523
|
break;
|
|
6513
6524
|
case "sign-in-required":
|
|
6514
|
-
|
|
6525
|
+
uo.add(e);
|
|
6515
6526
|
break;
|
|
6516
6527
|
case "unavailable":
|
|
6517
|
-
|
|
6528
|
+
fo.add(e);
|
|
6518
6529
|
break;
|
|
6519
6530
|
case "session-changed":
|
|
6520
|
-
|
|
6531
|
+
po.add(e);
|
|
6521
6532
|
break;
|
|
6522
|
-
case "transport-failure":
|
|
6533
|
+
case "transport-failure": mo.add(e);
|
|
6523
6534
|
}
|
|
6524
6535
|
return e;
|
|
6525
|
-
},
|
|
6536
|
+
}, go = (e) => oo.has(e), _o = (e) => so.has(e), vo = (e) => co.has(e), yo = (e) => lo.has(e), bo = (e) => uo.has(e), xo = (e) => fo.has(e), So = (e) => po.has(e), Co = (e) => mo.has(e), wo = "https://passflow-relative.invalid", To = () => {
|
|
6526
6537
|
let e = globalThis, t = e.document?.baseURI;
|
|
6527
6538
|
if (typeof t == "string" && t !== "") return t;
|
|
6528
6539
|
let n = e.location?.href;
|
|
6529
|
-
return typeof n == "string" && n !== "" && n !== "about:blank" ? n :
|
|
6530
|
-
},
|
|
6531
|
-
let n = t ===
|
|
6540
|
+
return typeof n == "string" && n !== "" && n !== "about:blank" ? n : wo;
|
|
6541
|
+
}, Eo = (e, t = To()) => {
|
|
6542
|
+
let n = t === wo, r;
|
|
6532
6543
|
try {
|
|
6533
6544
|
r = new URL(t).origin;
|
|
6534
6545
|
} catch {
|
|
@@ -6554,28 +6565,28 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6554
6565
|
relativeToBase: !1,
|
|
6555
6566
|
sentinelBase: n
|
|
6556
6567
|
};
|
|
6557
|
-
},
|
|
6568
|
+
}, Do = (e, t) => typeof t == "string" ? [e.toLowerCase(), t] : void 0, Oo = (e) => {
|
|
6558
6569
|
let t = [];
|
|
6559
6570
|
if (e == null) return Object.freeze(t);
|
|
6560
6571
|
let n = e;
|
|
6561
6572
|
if (typeof n.forEach == "function" && typeof n.entries == "function") return e.forEach((e, n) => {
|
|
6562
|
-
let r =
|
|
6573
|
+
let r = Do(n, e);
|
|
6563
6574
|
r && t.push(r);
|
|
6564
6575
|
}), Object.freeze(t);
|
|
6565
6576
|
if (Array.isArray(e)) {
|
|
6566
6577
|
for (let n of e) if (Array.isArray(n) && n.length >= 2) {
|
|
6567
|
-
let e =
|
|
6578
|
+
let e = Do(String(n[0]), n[1]);
|
|
6568
6579
|
e && t.push(e);
|
|
6569
6580
|
}
|
|
6570
6581
|
return Object.freeze(t);
|
|
6571
6582
|
}
|
|
6572
6583
|
if (typeof e == "object") for (let [n, r] of Object.entries(e)) {
|
|
6573
|
-
let e =
|
|
6584
|
+
let e = Do(n, Array.isArray(r) ? r.join(", ") : r);
|
|
6574
6585
|
e && t.push(e);
|
|
6575
6586
|
}
|
|
6576
6587
|
return Object.freeze(t);
|
|
6577
|
-
},
|
|
6578
|
-
let t = e.base === void 0 ?
|
|
6588
|
+
}, ko = (e) => {
|
|
6589
|
+
let t = e.base === void 0 ? Eo(e.url) : Eo(e.url, e.base), n = {
|
|
6579
6590
|
raw: e.url,
|
|
6580
6591
|
href: t.href,
|
|
6581
6592
|
dispatchUrl: t.sentinelBase || !t.resolved ? e.url : t.href,
|
|
@@ -6584,29 +6595,29 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6584
6595
|
resolved: t.resolved,
|
|
6585
6596
|
relativeToBase: t.relativeToBase,
|
|
6586
6597
|
method: (e.method ?? "GET").toUpperCase(),
|
|
6587
|
-
headers:
|
|
6598
|
+
headers: Oo(e.headers),
|
|
6588
6599
|
bodyKind: e.bodyKind,
|
|
6589
6600
|
..."body" in e ? { body: e.body } : {}
|
|
6590
6601
|
};
|
|
6591
6602
|
return Object.freeze(n);
|
|
6592
|
-
},
|
|
6603
|
+
}, Ao = (e, t) => {
|
|
6593
6604
|
if (!t || t.from === t.to) return e;
|
|
6594
6605
|
let n = !1, r = e.map(([e, r]) => e === "authorization" && r === t.from ? (n = !0, [e, t.to]) : [e, r]);
|
|
6595
6606
|
return n ? Object.freeze(r) : e;
|
|
6596
|
-
},
|
|
6607
|
+
}, jo = (e) => {
|
|
6597
6608
|
let t = {};
|
|
6598
6609
|
for (let [n, r] of e) t[n] = r;
|
|
6599
6610
|
return t;
|
|
6600
|
-
},
|
|
6611
|
+
}, Mo = /* @__PURE__ */ new Set([
|
|
6601
6612
|
"GET",
|
|
6602
6613
|
"HEAD",
|
|
6603
6614
|
"OPTIONS"
|
|
6604
|
-
]),
|
|
6615
|
+
]), No = (e) => typeof e == "object" && !!e && typeof e.url == "string" && typeof e.clone == "function" && "method" in e, Po = (e) => typeof e == "string" ? e : No(e) ? e.url : String(e), Fo = (e, t) => (t?.method ?? (No(e) ? e.method : void 0) ?? "GET").toUpperCase(), Io = (e) => e == null ? "none" : typeof e == "string" ? "reusable" : typeof e.getReader == "function" ? "one-shot" : "reusable", Lo = (e) => {
|
|
6605
6616
|
if (typeof e == "string") return e.length;
|
|
6606
6617
|
let t = e;
|
|
6607
6618
|
if (typeof t?.size == "number") return t.size;
|
|
6608
6619
|
if (typeof t?.byteLength == "number") return t.byteLength;
|
|
6609
|
-
},
|
|
6620
|
+
}, Ro = (e, t, n) => e === void 0 || e === "always" ? !0 : e === "idempotent-only" ? Mo.has(t.method) : typeof e == "function" ? e(t) : !(e.maxBodyBytes !== void 0 && n !== void 0 && n > e.maxBodyBytes), zo = (e, t, n, r, i) => ({
|
|
6610
6621
|
replayable: !1,
|
|
6611
6622
|
bodyKind: e,
|
|
6612
6623
|
reason: t,
|
|
@@ -6614,11 +6625,11 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6614
6625
|
forwardInit: i,
|
|
6615
6626
|
snapshot: r,
|
|
6616
6627
|
replay: () => Promise.reject(/* @__PURE__ */ Error(`This request cannot be replayed: ${t}`))
|
|
6617
|
-
}),
|
|
6628
|
+
}), Bo = (e, t) => jo(Ao(e.headers, t?.authorizationSwap)), Vo = (e) => {
|
|
6618
6629
|
if (!e || !("headers" in e)) return e;
|
|
6619
6630
|
let { headers: t, ...n } = e;
|
|
6620
6631
|
return n;
|
|
6621
|
-
},
|
|
6632
|
+
}, Ho = (e, t) => t && "headers" in t && t.headers !== void 0 ? t.headers : No(e) ? e.headers : void 0, Uo = (e) => {
|
|
6622
6633
|
if (e === null || typeof e == "string") return e;
|
|
6623
6634
|
if (typeof FormData < "u" && e instanceof FormData) {
|
|
6624
6635
|
let t = new FormData();
|
|
@@ -6626,18 +6637,18 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6626
6637
|
return t;
|
|
6627
6638
|
}
|
|
6628
6639
|
return typeof URLSearchParams < "u" && e instanceof URLSearchParams ? new URLSearchParams(e) : e instanceof ArrayBuffer ? e.slice(0) : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength).slice() : e;
|
|
6629
|
-
},
|
|
6630
|
-
let r =
|
|
6640
|
+
}, Wo = (e, t, n) => new Request(e, { headers: Bo(t, n) }), Go = (e, t, n) => {
|
|
6641
|
+
let r = Po(e), i = Fo(e, t), a = Ho(e, t), o = (e, t) => ko({
|
|
6631
6642
|
url: r,
|
|
6632
6643
|
method: i,
|
|
6633
6644
|
headers: a,
|
|
6634
6645
|
bodyKind: e,
|
|
6635
6646
|
...t === void 0 ? {} : { body: t }
|
|
6636
6647
|
});
|
|
6637
|
-
if (
|
|
6648
|
+
if (No(e)) {
|
|
6638
6649
|
if (e.body === null || e.body === void 0) {
|
|
6639
6650
|
let a = o("none");
|
|
6640
|
-
return
|
|
6651
|
+
return Ro(n, {
|
|
6641
6652
|
url: r,
|
|
6642
6653
|
method: i,
|
|
6643
6654
|
bodyKind: "none"
|
|
@@ -6647,20 +6658,20 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6647
6658
|
forwardInput: e,
|
|
6648
6659
|
forwardInit: t,
|
|
6649
6660
|
snapshot: a,
|
|
6650
|
-
replay: (n, r) => n(
|
|
6651
|
-
} :
|
|
6661
|
+
replay: (n, r) => n(Wo(e, a, r), Vo(t))
|
|
6662
|
+
} : zo("none", "the replay policy refused this request", e, a, t);
|
|
6652
6663
|
}
|
|
6653
6664
|
let a = o("request-clone");
|
|
6654
|
-
if (!
|
|
6665
|
+
if (!Ro(n, {
|
|
6655
6666
|
url: r,
|
|
6656
6667
|
method: i,
|
|
6657
6668
|
bodyKind: "request-clone"
|
|
6658
|
-
})) return
|
|
6669
|
+
})) return zo("request-clone", "the replay policy refused this request", e, a, t);
|
|
6659
6670
|
let s;
|
|
6660
6671
|
try {
|
|
6661
6672
|
s = e.clone();
|
|
6662
6673
|
} catch {
|
|
6663
|
-
return
|
|
6674
|
+
return zo("one-shot", "the Request body was already consumed and cannot be cloned", e, a, t);
|
|
6664
6675
|
}
|
|
6665
6676
|
return {
|
|
6666
6677
|
replayable: !0,
|
|
@@ -6668,17 +6679,17 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6668
6679
|
forwardInput: e,
|
|
6669
6680
|
forwardInit: t,
|
|
6670
6681
|
snapshot: a,
|
|
6671
|
-
replay: (e, n) => e(
|
|
6682
|
+
replay: (e, n) => e(Wo(s, a, n), Vo(t))
|
|
6672
6683
|
};
|
|
6673
6684
|
}
|
|
6674
|
-
let s =
|
|
6675
|
-
if (s === "one-shot") return
|
|
6676
|
-
if (!
|
|
6685
|
+
let s = Io(t?.body);
|
|
6686
|
+
if (s === "one-shot") return zo("one-shot", "a streaming request body is consumed by the first send", e, o("one-shot"), t);
|
|
6687
|
+
if (!Ro(n, {
|
|
6677
6688
|
url: r,
|
|
6678
6689
|
method: i,
|
|
6679
6690
|
bodyKind: s
|
|
6680
|
-
},
|
|
6681
|
-
let c = t && "body" in t ?
|
|
6691
|
+
}, Lo(t?.body))) return zo(s, "the replay policy refused this request", e, o(s), t);
|
|
6692
|
+
let c = t && "body" in t ? Uo(t.body ?? null) : void 0, l = o(s, c);
|
|
6682
6693
|
return {
|
|
6683
6694
|
replayable: !0,
|
|
6684
6695
|
bodyKind: s,
|
|
@@ -6686,21 +6697,21 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6686
6697
|
forwardInit: t,
|
|
6687
6698
|
snapshot: l,
|
|
6688
6699
|
replay: (e, n) => e(l.dispatchUrl, {
|
|
6689
|
-
...
|
|
6700
|
+
...Vo(t),
|
|
6690
6701
|
...c === void 0 ? {} : { body: c },
|
|
6691
|
-
headers:
|
|
6702
|
+
headers: Bo(l, n),
|
|
6692
6703
|
method: l.method
|
|
6693
6704
|
})
|
|
6694
6705
|
};
|
|
6695
|
-
},
|
|
6696
|
-
if (!
|
|
6706
|
+
}, Ko = (e) => typeof e == "object" && !!e, qo = (e) => (t) => {
|
|
6707
|
+
if (!Ko(e)) return;
|
|
6697
6708
|
let n = e[t] ?? e[t.toLowerCase()] ?? (typeof e.get == "function" ? e.get(t) : void 0);
|
|
6698
6709
|
return Array.isArray(n) ? n.join(", ") : typeof n == "string" ? n : void 0;
|
|
6699
|
-
},
|
|
6710
|
+
}, Jo = (e) => {
|
|
6700
6711
|
let t = e?.url ?? "", n = e?.baseURL;
|
|
6701
6712
|
return !n || /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t) ? t : `${n.replace(/\/+$/, "")}/${t.replace(/^\/+/, "")}`;
|
|
6702
|
-
},
|
|
6703
|
-
let r = Ao(
|
|
6713
|
+
}, Yo = (e) => (e?.method ?? "GET").toUpperCase(), Xo = (e) => e == null ? "none" : Ko(e) && (typeof e.pipe == "function" || typeof e.getReader == "function") ? "one-shot" : "reusable", Zo = (e, t, n) => {
|
|
6714
|
+
let r = jo(Ao(t.headers, n?.authorizationSwap)), i = t.dispatchUrl === t.href && t.resolved;
|
|
6704
6715
|
return {
|
|
6705
6716
|
...e,
|
|
6706
6717
|
...i ? { baseURL: void 0 } : {},
|
|
@@ -6709,10 +6720,10 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6709
6720
|
headers: r,
|
|
6710
6721
|
..."body" in t ? { data: t.body } : {}
|
|
6711
6722
|
};
|
|
6712
|
-
},
|
|
6713
|
-
let o = t ?? e?.config, s =
|
|
6714
|
-
url:
|
|
6715
|
-
method:
|
|
6723
|
+
}, Qo = (e, t, n, r, i, a) => {
|
|
6724
|
+
let o = t ?? e?.config, s = Xo(o?.data), c = a ?? ko({
|
|
6725
|
+
url: Jo(o),
|
|
6726
|
+
method: Yo(o),
|
|
6716
6727
|
headers: o?.headers,
|
|
6717
6728
|
bodyKind: s,
|
|
6718
6729
|
body: o?.data
|
|
@@ -6720,22 +6731,22 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6720
6731
|
url: c.href,
|
|
6721
6732
|
method: c.method,
|
|
6722
6733
|
bodyKind: s
|
|
6723
|
-
}, u = s !== "one-shot" &&
|
|
6734
|
+
}, u = s !== "one-shot" && Ro(i.replay, l);
|
|
6724
6735
|
return {
|
|
6725
6736
|
status: e?.status ?? 0,
|
|
6726
|
-
getHeader:
|
|
6737
|
+
getHeader: qo(e?.headers),
|
|
6727
6738
|
readBody: async () => e?.data,
|
|
6728
6739
|
request: c,
|
|
6729
6740
|
replay: async (e) => {
|
|
6730
|
-
let t = Ie(
|
|
6741
|
+
let t = Ie(Zo(o ?? {}, c, e));
|
|
6731
6742
|
try {
|
|
6732
6743
|
let e = await r(t);
|
|
6733
|
-
return
|
|
6744
|
+
return Qo(e, e?.config ?? t, e, r, i, c);
|
|
6734
6745
|
} catch (e) {
|
|
6735
|
-
let n =
|
|
6746
|
+
let n = Ko(e) ? e : {};
|
|
6736
6747
|
if (!n.response || typeof n.response.status != "number" || wi(e)) throw e;
|
|
6737
6748
|
return {
|
|
6738
|
-
...
|
|
6749
|
+
...Qo(n.response, n.config ?? t, e, r, i, c),
|
|
6739
6750
|
rejected: !0
|
|
6740
6751
|
};
|
|
6741
6752
|
}
|
|
@@ -6749,30 +6760,30 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6749
6760
|
replayUnsupportedReason: s === "one-shot" ? "a streaming request body is consumed by the first send" : "the replay policy refused this request",
|
|
6750
6761
|
signal: o?.signal
|
|
6751
6762
|
};
|
|
6752
|
-
},
|
|
6753
|
-
let r =
|
|
6763
|
+
}, $o = (e, t) => async (n) => {
|
|
6764
|
+
let r = Ba(e), i = Ko(n) ? n : {}, a = ao(await no(Qo(i.response, i.config, i.response, t, r), r), n);
|
|
6754
6765
|
if (a.settle === "reject") throw a.error;
|
|
6755
6766
|
return a.value;
|
|
6756
|
-
},
|
|
6757
|
-
let r = e.request, i = n ?? (typeof r == "function" ? (t) => r.call(e, t) : () => Promise.reject(/* @__PURE__ */ Error("Passflow: this client exposes no request() to replay through."))), a = e.interceptors.response.use(void 0,
|
|
6767
|
+
}, es = (e, t, n) => {
|
|
6768
|
+
let r = e.request, i = n ?? (typeof r == "function" ? (t) => r.call(e, t) : () => Promise.reject(/* @__PURE__ */ Error("Passflow: this client exposes no request() to replay through."))), a = e.interceptors.response.use(void 0, $o(t, i)), o = !1;
|
|
6758
6769
|
return () => {
|
|
6759
6770
|
o || (o = !0, e.interceptors.response.eject(a));
|
|
6760
6771
|
};
|
|
6761
|
-
},
|
|
6772
|
+
}, ts = (t, n) => {
|
|
6762
6773
|
let r = e.create(t);
|
|
6763
6774
|
return n(r), r;
|
|
6764
|
-
},
|
|
6775
|
+
}, ns = () => {
|
|
6765
6776
|
let e = typeof location > "u" ? void 0 : location.origin;
|
|
6766
6777
|
return e && e !== "null" ? e : void 0;
|
|
6767
|
-
},
|
|
6778
|
+
}, rs = (e) => {
|
|
6768
6779
|
let t = new URL(e).origin;
|
|
6769
6780
|
if (t === "null") throw Error(`Passflow: "${e}" has no origin a request can be matched against; list http(s) origins only.`);
|
|
6770
6781
|
return t;
|
|
6771
|
-
},
|
|
6772
|
-
let n = (t?.origins ?? []).map(
|
|
6782
|
+
}, is = (e, t) => {
|
|
6783
|
+
let n = (t?.origins ?? []).map(rs);
|
|
6773
6784
|
return (t, r) => {
|
|
6774
6785
|
if (r) return Promise.resolve(void 0);
|
|
6775
|
-
let i =
|
|
6786
|
+
let i = ns(), a;
|
|
6776
6787
|
try {
|
|
6777
6788
|
a = new URL(t, i).origin;
|
|
6778
6789
|
} catch {
|
|
@@ -6780,22 +6791,22 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6780
6791
|
}
|
|
6781
6792
|
return a !== i && !n.includes(a) ? Promise.resolve(void 0) : e();
|
|
6782
6793
|
};
|
|
6783
|
-
},
|
|
6784
|
-
let r =
|
|
6794
|
+
}, as = (e) => typeof Request < "u" && e instanceof Request, os = (e, t) => new Headers(t?.headers === void 0 ? as(e) ? e.headers : void 0 : t.headers), ss = (e, t, n) => {
|
|
6795
|
+
let r = is(t, n);
|
|
6785
6796
|
return async (t, n) => {
|
|
6786
|
-
let i =
|
|
6797
|
+
let i = as(t) ? t.url : t instanceof URL ? t.href : String(t), a = os(t, n), o = await r(i, a.has("authorization"));
|
|
6787
6798
|
return o ? (a.set("authorization", `Bearer ${o}`), e(t, {
|
|
6788
6799
|
...n,
|
|
6789
6800
|
headers: a
|
|
6790
6801
|
})) : e(t, n);
|
|
6791
6802
|
};
|
|
6792
|
-
},
|
|
6803
|
+
}, cs = (e) => {
|
|
6793
6804
|
let t = e.url ?? "", n = /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
6794
6805
|
return !e.baseURL || n && e.allowAbsoluteUrls !== !1 ? t : t ? `${e.baseURL.replace(/\/?\/$/, "")}/${t.replace(/^\/+/, "")}` : e.baseURL;
|
|
6795
|
-
},
|
|
6796
|
-
let n =
|
|
6806
|
+
}, ls = (e) => e ? typeof e.has == "function" ? e.has("Authorization") : Object.keys(e).some((t) => t.toLowerCase() === "authorization" && e[t] != null) : !1, us = (e, t) => {
|
|
6807
|
+
let n = is(e, t);
|
|
6797
6808
|
return async (e) => {
|
|
6798
|
-
let t = e.headers, r = await n(
|
|
6809
|
+
let t = e.headers, r = await n(cs(e), ls(t));
|
|
6799
6810
|
if (!r) return e;
|
|
6800
6811
|
let i = `Bearer ${r}`;
|
|
6801
6812
|
return t && typeof t.set == "function" ? t.set("Authorization", i) : e.headers = {
|
|
@@ -6803,7 +6814,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6803
6814
|
Authorization: i
|
|
6804
6815
|
}, e;
|
|
6805
6816
|
};
|
|
6806
|
-
},
|
|
6817
|
+
}, ds = 0, fs = (e, t) => {
|
|
6807
6818
|
let n = t?.signal ?? (typeof e == "object" && e ? e.signal : void 0) ?? void 0;
|
|
6808
6819
|
if (n) return {
|
|
6809
6820
|
get aborted() {
|
|
@@ -6817,34 +6828,34 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6817
6828
|
removeEventListener: (e, t) => n.removeEventListener(e, t)
|
|
6818
6829
|
} : {}
|
|
6819
6830
|
};
|
|
6820
|
-
},
|
|
6831
|
+
}, ps = (e) => (t) => e.headers?.get(t), ms = (e, t, n, r, i) => ({
|
|
6821
6832
|
status: e.status,
|
|
6822
|
-
getHeader:
|
|
6833
|
+
getHeader: ps(e),
|
|
6823
6834
|
readBody: () => e.clone().json(),
|
|
6824
6835
|
request: t.snapshot,
|
|
6825
|
-
replay: async (e) =>
|
|
6836
|
+
replay: async (e) => ms(await t.replay(n, e), t, n, r, i),
|
|
6826
6837
|
markers: r,
|
|
6827
6838
|
raw: e,
|
|
6828
6839
|
replayable: t.replayable,
|
|
6829
6840
|
replayUnsupportedReason: t.reason,
|
|
6830
6841
|
signal: i,
|
|
6831
6842
|
responseType: e.type
|
|
6832
|
-
}),
|
|
6843
|
+
}), hs = (e, t) => {
|
|
6833
6844
|
let n = (t, n) => {
|
|
6834
|
-
|
|
6845
|
+
ds += 1;
|
|
6835
6846
|
try {
|
|
6836
6847
|
return e(t, n);
|
|
6837
6848
|
} finally {
|
|
6838
|
-
--
|
|
6849
|
+
--ds;
|
|
6839
6850
|
}
|
|
6840
6851
|
};
|
|
6841
6852
|
return async (e, r) => {
|
|
6842
|
-
if (
|
|
6843
|
-
let i =
|
|
6853
|
+
if (ds > 0) return n(e, r);
|
|
6854
|
+
let i = Ba(t), a = Go(e, r, i.replay), o = await n(a.forwardInput, a.forwardInit), s = io(await no(ms(o, a, n, {}, fs(e, r)), i), o, i);
|
|
6844
6855
|
if (s.settle === "reject") throw s.error;
|
|
6845
6856
|
return s.value;
|
|
6846
6857
|
};
|
|
6847
|
-
},
|
|
6858
|
+
}, gs = new Set(va.filter((e) => !e.requiresPrepare).map((e) => e.type)), _s = (e) => {
|
|
6848
6859
|
if (!e || typeof e != "object" || !e.challenge_id || !e.expires_at) throw new $({
|
|
6849
6860
|
kind: "protocol",
|
|
6850
6861
|
message: "The upgrade start response is missing challenge_id or expires_at"
|
|
@@ -6856,16 +6867,16 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6856
6867
|
webauthn: e.webauthn,
|
|
6857
6868
|
codeSentTo: e.code_sent_to
|
|
6858
6869
|
};
|
|
6859
|
-
},
|
|
6870
|
+
}, vs = (e) => wi(e) && !Ti(e), ys = (e) => ({
|
|
6860
6871
|
async prepare(t) {
|
|
6861
|
-
if (!
|
|
6872
|
+
if (!gs.has(t)) try {
|
|
6862
6873
|
let n = e.relyingPartyId?.();
|
|
6863
|
-
return
|
|
6874
|
+
return _s(await e.startUpgrade(n ? {
|
|
6864
6875
|
method: t,
|
|
6865
6876
|
relying_party_id: n
|
|
6866
6877
|
} : { method: t }));
|
|
6867
6878
|
} catch (e) {
|
|
6868
|
-
if (
|
|
6879
|
+
if (vs(e)) throw e;
|
|
6869
6880
|
let t = ji(e, "start");
|
|
6870
6881
|
if (t.kind === "prepare_not_required") return;
|
|
6871
6882
|
throw t;
|
|
@@ -6883,17 +6894,17 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6883
6894
|
assertion: n
|
|
6884
6895
|
});
|
|
6885
6896
|
} catch (t) {
|
|
6886
|
-
if (
|
|
6897
|
+
if (vs(t)) throw t;
|
|
6887
6898
|
let n = ji(t, "refresh");
|
|
6888
6899
|
throw n.status === 401 && Ni(n) && e.markSessionInvalid?.(), n;
|
|
6889
6900
|
}
|
|
6890
6901
|
}
|
|
6891
|
-
}),
|
|
6902
|
+
}), bs = (e) => e === void 0 ? [] : (Array.isArray(e) ? e : [e]).filter((e) => e !== ""), xs = (e) => {
|
|
6892
6903
|
let t, n = (e) => e !== void 0 && t === e, r = (r) => {
|
|
6893
6904
|
let i = () => {
|
|
6894
6905
|
if (!n(r())) throw new $({ kind: "session_changed" });
|
|
6895
6906
|
};
|
|
6896
|
-
return
|
|
6907
|
+
return ys({
|
|
6897
6908
|
...e,
|
|
6898
6909
|
relyingPartyId: () => t?.options.relyingPartyId ?? e.relyingPartyId?.(),
|
|
6899
6910
|
startUpgrade: (t) => (i(), e.startUpgrade(t)),
|
|
@@ -6904,7 +6915,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6904
6915
|
});
|
|
6905
6916
|
}, i = (t, n) => {
|
|
6906
6917
|
let i = {}, a = {
|
|
6907
|
-
controller: new
|
|
6918
|
+
controller: new za({
|
|
6908
6919
|
transport: r(() => i.current),
|
|
6909
6920
|
prompt: t.prompt,
|
|
6910
6921
|
platform: e.platform,
|
|
@@ -6916,7 +6927,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6916
6927
|
options: t,
|
|
6917
6928
|
scope: {
|
|
6918
6929
|
passflow: e.passflowDomain,
|
|
6919
|
-
backend:
|
|
6930
|
+
backend: bs(t.backend)
|
|
6920
6931
|
},
|
|
6921
6932
|
generation: n
|
|
6922
6933
|
};
|
|
@@ -6926,14 +6937,14 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6926
6937
|
s = void 0;
|
|
6927
6938
|
});
|
|
6928
6939
|
let c = (e) => {
|
|
6929
|
-
if (!s ||
|
|
6940
|
+
if (!s || Ra(s.challenge, e)) return;
|
|
6930
6941
|
let t = Math.min(o, e.maxAge === void 0 ? o : e.maxAge * 1e3);
|
|
6931
6942
|
if (!(Date.now() - s.at > t)) return s.challenge;
|
|
6932
6943
|
}, l = async (r, i) => {
|
|
6933
6944
|
let o = t;
|
|
6934
6945
|
if (!o) throw new Fi("Step-up verification is not enabled on this Passflow instance");
|
|
6935
6946
|
let l = e.stopRepeatedElevation ? c(r) : void 0;
|
|
6936
|
-
if (l) throw new Pi(
|
|
6947
|
+
if (l) throw new Pi(Fa(l), Fa(r), "This requirement was already proved and the server still refused it: sign the user in again");
|
|
6937
6948
|
o.controller.active || (o.pin = e.readSessionPin?.());
|
|
6938
6949
|
let u = await o.controller.elevate(r, i);
|
|
6939
6950
|
if (!n(o)) throw new Ii();
|
|
@@ -6983,9 +6994,9 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
6983
6994
|
let r = [];
|
|
6984
6995
|
if (e.attachInternalSeam) {
|
|
6985
6996
|
let t = e.attachInternalSeam;
|
|
6986
|
-
t((e) =>
|
|
6997
|
+
t((e) => $o(u, e)), r.push(() => t(void 0));
|
|
6987
6998
|
}
|
|
6988
|
-
n.interceptFetch && r.push(nn((e, t, n) =>
|
|
6999
|
+
n.interceptFetch && r.push(nn((e, t, n) => hs(e, u)(t, n), {
|
|
6989
7000
|
priority: 20,
|
|
6990
7001
|
name: "passflow-upgrade"
|
|
6991
7002
|
})), e.onSessionChange && r.push(e.onSessionChange(() => {
|
|
@@ -7017,8 +7028,8 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
7017
7028
|
enumerable: !0,
|
|
7018
7029
|
value: (t, n) => {
|
|
7019
7030
|
let r = (t) => {
|
|
7020
|
-
let r =
|
|
7021
|
-
return e.readAccessToken ?
|
|
7031
|
+
let r = hs(t, u);
|
|
7032
|
+
return e.readAccessToken ? ss(r, e.readAccessToken, n) : r;
|
|
7022
7033
|
};
|
|
7023
7034
|
if (t) return r(t);
|
|
7024
7035
|
let i = typeof globalThis > "u" ? void 0 : globalThis;
|
|
@@ -7029,14 +7040,14 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
7029
7040
|
attachAuth: {
|
|
7030
7041
|
enumerable: !0,
|
|
7031
7042
|
value: (t, n) => {
|
|
7032
|
-
let r = e.readAccessToken ? t.interceptors.request : void 0, i = r?.use(
|
|
7043
|
+
let r = e.readAccessToken ? t.interceptors.request : void 0, i = r?.use(us(e.readAccessToken, n)), a = es(t, u);
|
|
7033
7044
|
return () => {
|
|
7034
7045
|
a(), r && i !== void 0 && r.eject(i);
|
|
7035
7046
|
};
|
|
7036
7047
|
}
|
|
7037
7048
|
}
|
|
7038
7049
|
});
|
|
7039
|
-
},
|
|
7050
|
+
}, Ss, Cs = class {
|
|
7040
7051
|
get origin() {
|
|
7041
7052
|
return this.platform.getCurrentUrl()?.origin ?? "";
|
|
7042
7053
|
}
|
|
@@ -7049,9 +7060,9 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
7049
7060
|
prefix: e.keyStoragePrefix ?? "",
|
|
7050
7061
|
storage: this.platform.storage,
|
|
7051
7062
|
appId: n
|
|
7052
|
-
}), this.deviceService = new de(this.storageManager), this.authApi = new jt(e, this.storageManager, this.deviceService), this.appApi = new wt(e, this.storageManager, this.deviceService), this.userApi = new Ht(e, this.storageManager, this.deviceService), this.settingApi = new Pt(e, this.storageManager, this.deviceService), this.tenantApi = new Ft(e, this.storageManager, this.deviceService), this.invitationApi = new Nt(e, this.storageManager, this.deviceService), this.twoFactorApi = new Bt(e, this.storageManager, this.deviceService), this.upgradeApi = new Vt(e, this.storageManager, this.deviceService), this.upgradeDomain = Be(e.url), this.subscribeStore = new Rn(), this.tokenCacheService = new
|
|
7063
|
+
}), this.deviceService = new de(this.storageManager), this.authApi = new jt(e, this.storageManager, this.deviceService), this.appApi = new wt(e, this.storageManager, this.deviceService), this.userApi = new Ht(e, this.storageManager, this.deviceService), this.settingApi = new Pt(e, this.storageManager, this.deviceService), this.tenantApi = new Ft(e, this.storageManager, this.deviceService), this.invitationApi = new Nt(e, this.storageManager, this.deviceService), this.twoFactorApi = new Bt(e, this.storageManager, this.deviceService), this.upgradeApi = new Vt(e, this.storageManager, this.deviceService), this.upgradeDomain = Be(e.url), this.subscribeStore = new Rn(), this.tokenCacheService = new ua(this.storageManager, this.authApi, this.subscribeStore, this.platform), this.scopes = r ?? _, this.createTenantForNewUser = e.createTenantForNewUser ?? !1;
|
|
7053
7064
|
let i = Mr(e.refreshCoordination, this.platform, e.keyStoragePrefix, { tokenKeys: () => this.storageManager.tokenKeys() });
|
|
7054
|
-
this.authService = new
|
|
7065
|
+
this.authService = new oa(this.authApi, this.deviceService, this.storageManager, this.subscribeStore, this.tokenCacheService, this.scopes, this.createTenantForNewUser, this.url, {
|
|
7055
7066
|
createSession: async (e) => {
|
|
7056
7067
|
await this.createSessionCallback?.(e);
|
|
7057
7068
|
},
|
|
@@ -7071,7 +7082,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
7071
7082
|
...e.antiBotWorkerUrl ? { workerUrl: e.antiBotWorkerUrl } : {}
|
|
7072
7083
|
}), this.authApi.setAntiBotHandler((e) => this.antiBot.headerFor(e)), this.tokenCacheService.attachRefreshController(this.authService.refresh);
|
|
7073
7084
|
for (let e of this.axiosClients()) e.setRefreshHandler((e) => this.authService.refresh.ensureFresh(e));
|
|
7074
|
-
this.userService = new
|
|
7085
|
+
this.userService = new fa(this.userApi, this.deviceService, this.platform), this.tenantService = new la(this.tenantApi, this.scopes), this.tenant = this.tenantService, this.invitationService = new sa(this.invitationApi), this.twoFactorService = new da(this.twoFactorApi, this.subscribeStore, this.authService), this.twoFactor = this.twoFactorService, this.upgrade = xs({
|
|
7075
7086
|
startUpgrade: (e) => this.upgradeApi.startUpgrade(e),
|
|
7076
7087
|
commitRefresh: async (e, t) => {
|
|
7077
7088
|
await this.authService.refreshToken(e, t);
|
|
@@ -7100,7 +7111,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
7100
7111
|
let e = (await this.getTokens(!0))?.access_token;
|
|
7101
7112
|
return e && !A(j(e)) ? e : void 0;
|
|
7102
7113
|
}
|
|
7103
|
-
}), this.hostedUpgrade =
|
|
7114
|
+
}), this.hostedUpgrade = xs({
|
|
7104
7115
|
startUpgrade: (e) => this.upgradeApi.startHostedUpgrade(e),
|
|
7105
7116
|
commitRefresh: (e) => this.upgradeApi.commitHostedUpgrade(e),
|
|
7106
7117
|
canCommit: () => ({ ok: !0 }),
|
|
@@ -7137,7 +7148,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
7137
7148
|
return this.upgrade.attachAuth(e, t);
|
|
7138
7149
|
}
|
|
7139
7150
|
createClient(e, t) {
|
|
7140
|
-
return
|
|
7151
|
+
return ts(e, (e) => this.upgrade.attachAuth(e, t));
|
|
7141
7152
|
}
|
|
7142
7153
|
readAssuranceBar() {
|
|
7143
7154
|
let e = this.storageManager.getToken(M.access_token);
|
|
@@ -7750,7 +7761,7 @@ var Ki = (e) => e ? [e] : [], qi = "passflow_2fa_pkce", Ji = 3e5, Yi = "passflow
|
|
|
7750
7761
|
this.twoFactorService.clearMagicLinkSession();
|
|
7751
7762
|
}
|
|
7752
7763
|
};
|
|
7753
|
-
|
|
7754
|
-
export { p as AGENT_TOOL_HEADER_KEY, m as ANTI_BOT_ACTION, Ke as ANTI_BOT_FAILED_ERROR_ID, f as ANTI_BOT_HEADER_KEY, Ye as ANTI_BOT_PROVIDER_FAILED_ERROR_ID, Je as ANTI_BOT_PROVIDER_MISSING_ERROR_ID, Ge as ANTI_BOT_REQUIRED_ERROR_ID, Xe as ANTI_BOT_SOLVE_FAILED_ERROR_ID, qe as ANTI_BOT_UNAVAILABLE_ERROR_ID, c as APP_ID_HEADER_KEY, $e as APP_SECRET_NAMES, l as AUTHORIZATION_HEADER_KEY, wt as AppAPI, jt as AuthAPI,
|
|
7764
|
+
Ss = Cs, Ss.version = h;
|
|
7765
|
+
export { p as AGENT_TOOL_HEADER_KEY, m as ANTI_BOT_ACTION, Ke as ANTI_BOT_FAILED_ERROR_ID, f as ANTI_BOT_HEADER_KEY, Ye as ANTI_BOT_PROVIDER_FAILED_ERROR_ID, Je as ANTI_BOT_PROVIDER_MISSING_ERROR_ID, Ge as ANTI_BOT_REQUIRED_ERROR_ID, Xe as ANTI_BOT_SOLVE_FAILED_ERROR_ID, qe as ANTI_BOT_UNAVAILABLE_ERROR_ID, c as APP_ID_HEADER_KEY, $e as APP_SECRET_NAMES, l as AUTHORIZATION_HEADER_KEY, wt as AppAPI, jt as AuthAPI, oa as AuthService, Mt as CLIAuthAPI, y as DEFAULT_GROUP_NAME, _ as DEFAULT_SCOPES, va as DEFAULT_UPGRADE_FACTORS, u as DEVICE_ID_HEADER_KEY, d as DEVICE_TYPE_HEADER_KEY, E as ERROR_MESSAGE_MAX_LENGTH, Ut as FETCH_PRIORITY_OIDC, Wt as FETCH_PRIORITY_UPGRADE, Gt as FetchMiddlewareContractError, ve as INSUFFICIENT_USER_AUTHENTICATION, Nt as InvitationAPI, sa as InvitationService, fn as M2MClient, sn as M2MConfigError, H as M2MError, cn as M2MErrorCodes, an as M2MNetworkError, on as M2MTokenParseError, ln as M2M_DEFAULTS, et as MASKED_SECRET_PREFIX, g as MINIMAL_DEFAULT_SCOPES, rt as OS, v as PASSFLOW_CLOUD_URL, We as PASSWORD_CHANGE_REQUIRED_ERROR_ID, x as POPUP_HEIGHT, ee as POPUP_POLL_INTERVAL_MS, S as POPUP_TIMEOUT_MS, b as POPUP_WIDTH, Cs as Passflow, ze as PassflowAdminEndpointPaths, z as PassflowEndpointPaths, B as PassflowError, G as PassflowEvent, U as PassflowOidcError, Ze as PassflowPasswordChangeRequiredError, Y as PassflowRefreshError, fe as PopupClosedError, Qe as Providers, vi as RECOVERABLE_COMMIT_ERROR_IDS, Fr as REFRESH_AUTH_FAILURE_IDS, J as RefreshErrorId, Re as RequestMethod, h as SDK_VERSION, He as SERVICE_UNAVAILABLE_ERROR_ID, Ue as SERVICE_UNAVAILABLE_MESSAGE, yi as SESSION_INVALIDATING_COMMIT_ERROR_IDS, tt as SETTINGS_MASKED_VALUE_UNKNOWN_ERROR_ID, se as SessionState, Pt as SettingAPI, C as TOKEN_EXPIRY_BUFFER_SECONDS, Ft as TenantAPI, la as TenantService, ca as TenantUserMembership, ua as TokenCacheService, N as TokenDeliveryMode, M as TokenType, Bt as TwoFactorApiClient, ot as TwoFactorPolicy, da as TwoFactorService, ye as UPGRADE_REQUIRED, T as USERNAME_MAX_LENGTH, w as USERNAME_MIN_LENGTH, Vt as UpgradeAPI, Ta as UpgradeCancelledError, qr as UpgradeCommitInterruptedError, za as UpgradeController, Q as UpgradeErrorIds, pa as UpgradeFactorError, Pi as UpgradeInsufficientError, Ii as UpgradeSessionChangedError, Ea as UpgradeSignInRequiredError, $ as UpgradeTransportError, Fi as UpgradeUnavailableError, ja as UpgradeUnsatisfiableError, Ht as UserAPI, fa as UserService, L as WebAdapter, ji as classifyUpgradeError, ya as factorRegistry, rn as fetchRegistryState, it as getOSFromDeviceType, Ni as invalidatesSessionOnCommit, Ve as isEmailVerificationStep, nt as isMaskedSecret, Mi as isRecoverableCommitFailure, xi as isRetryableUpgradeKind, A as isTokenExpired, go as isUpgradeCancelled, _o as isUpgradeExhausted, vo as isUpgradeInsufficient, So as isUpgradeSessionChanged, bo as isUpgradeSignInRequired, Ti as isUpgradeTransportError, Co as isUpgradeTransportFailure, xo as isUpgradeUnavailable, yo as isUpgradeUnsatisfiable, Vi as isValidEmail, zi as isValidJWTFormat, Hi as isValidPhoneNumber, Ui as isValidUsername, Ee as parseChallengeBody, Te as parseChallengeHeader, j as parseToken, Ae as parseUpgradeChallenge, _a as passkeyFactor, at as pathWithParams, ga as recoveryCodesFactor, nn as registerFetchMiddleware, _e as requiredAcrLevel, Be as resolveUpgradeDomain, Bi as sanitizeErrorMessage, wa as selectFactors, ha as totpFactor, R as webAdapter };
|
|
7755
7766
|
|
|
7756
7767
|
//# sourceMappingURL=index.mjs.map
|