@passflow/core 0.39.2 → 0.39.3
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/README.md +11 -3
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.mjs +9 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3414,7 +3414,7 @@ export declare class TwoFactorApiClient {
|
|
|
3414
3414
|
*/
|
|
3415
3415
|
beginEnrollment(tfaToken: string): Promise<TwoFactorSetupResponse>;
|
|
3416
3416
|
/**
|
|
3417
|
-
* Confirm 2FA setup on the sign-in itself; `verify` with the
|
|
3417
|
+
* Confirm 2FA setup on the sign-in itself; `verify` with the next authenticator code then finishes it
|
|
3418
3418
|
* POST /auth/2fa/setup/confirm
|
|
3419
3419
|
*/
|
|
3420
3420
|
confirmEnrollment(tfaToken: string, payload: TwoFactorConfirmRequest): Promise<TwoFactorConfirmResponse>;
|
|
@@ -5240,7 +5240,7 @@ export declare class TwoFactorService {
|
|
|
5240
5240
|
beginEnrollment(): Promise<TwoFactorSetupResponse>;
|
|
5241
5241
|
/**
|
|
5242
5242
|
* Confirm 2FA setup on the sign-in itself (`direct`). The sign-in stays pending:
|
|
5243
|
-
* show the recovery codes, then `verify` with the
|
|
5243
|
+
* show the recovery codes, then `verify` with the next authenticator code finishes it.
|
|
5244
5244
|
*/
|
|
5245
5245
|
confirmEnrollment(code: string): Promise<TwoFactorConfirmResponse>;
|
|
5246
5246
|
/**
|
|
@@ -6651,9 +6651,9 @@ export declare class Passflow {
|
|
|
6651
6651
|
private adoptTwoFactorTokenFromUrl;
|
|
6652
6652
|
private checkErrorsFromURL;
|
|
6653
6653
|
/**
|
|
6654
|
-
* When a token appears in the query or the fragment, removes every token
|
|
6655
|
-
* from the query, and
|
|
6656
|
-
*
|
|
6654
|
+
* When a token appears in the query or the fragment, removes every token, `client_challenge` and
|
|
6655
|
+
* `user_state` from the query, and those and `state` from whichever part carried the tokens, in
|
|
6656
|
+
* one history replace. Other params stay, in the query and in the fragment.
|
|
6657
6657
|
*/
|
|
6658
6658
|
private cleanupUrlParams;
|
|
6659
6659
|
private setTokensToCacheFromLocalStorage;
|
|
@@ -7796,7 +7796,7 @@ export declare class Passflow {
|
|
|
7796
7796
|
beginTwoFactorEnrollment(): Promise<TwoFactorSetupResponse>;
|
|
7797
7797
|
/**
|
|
7798
7798
|
* Confirm 2FA setup on the pending sign-in. The sign-in stays pending: show the recovery codes,
|
|
7799
|
-
* then `verifyTwoFactor` with the
|
|
7799
|
+
* then `verifyTwoFactor` with the next authenticator code finishes it.
|
|
7800
7800
|
*
|
|
7801
7801
|
* @param code - TOTP code from the authenticator app
|
|
7802
7802
|
* @returns Promise with the recovery codes the user must save
|
package/dist/index.d.ts
CHANGED
|
@@ -3414,7 +3414,7 @@ export declare class TwoFactorApiClient {
|
|
|
3414
3414
|
*/
|
|
3415
3415
|
beginEnrollment(tfaToken: string): Promise<TwoFactorSetupResponse>;
|
|
3416
3416
|
/**
|
|
3417
|
-
* Confirm 2FA setup on the sign-in itself; `verify` with the
|
|
3417
|
+
* Confirm 2FA setup on the sign-in itself; `verify` with the next authenticator code then finishes it
|
|
3418
3418
|
* POST /auth/2fa/setup/confirm
|
|
3419
3419
|
*/
|
|
3420
3420
|
confirmEnrollment(tfaToken: string, payload: TwoFactorConfirmRequest): Promise<TwoFactorConfirmResponse>;
|
|
@@ -5240,7 +5240,7 @@ export declare class TwoFactorService {
|
|
|
5240
5240
|
beginEnrollment(): Promise<TwoFactorSetupResponse>;
|
|
5241
5241
|
/**
|
|
5242
5242
|
* Confirm 2FA setup on the sign-in itself (`direct`). The sign-in stays pending:
|
|
5243
|
-
* show the recovery codes, then `verify` with the
|
|
5243
|
+
* show the recovery codes, then `verify` with the next authenticator code finishes it.
|
|
5244
5244
|
*/
|
|
5245
5245
|
confirmEnrollment(code: string): Promise<TwoFactorConfirmResponse>;
|
|
5246
5246
|
/**
|
|
@@ -6651,9 +6651,9 @@ export declare class Passflow {
|
|
|
6651
6651
|
private adoptTwoFactorTokenFromUrl;
|
|
6652
6652
|
private checkErrorsFromURL;
|
|
6653
6653
|
/**
|
|
6654
|
-
* When a token appears in the query or the fragment, removes every token
|
|
6655
|
-
* from the query, and
|
|
6656
|
-
*
|
|
6654
|
+
* When a token appears in the query or the fragment, removes every token, `client_challenge` and
|
|
6655
|
+
* `user_state` from the query, and those and `state` from whichever part carried the tokens, in
|
|
6656
|
+
* one history replace. Other params stay, in the query and in the fragment.
|
|
6657
6657
|
*/
|
|
6658
6658
|
private cleanupUrlParams;
|
|
6659
6659
|
private setTokensToCacheFromLocalStorage;
|
|
@@ -7796,7 +7796,7 @@ export declare class Passflow {
|
|
|
7796
7796
|
beginTwoFactorEnrollment(): Promise<TwoFactorSetupResponse>;
|
|
7797
7797
|
/**
|
|
7798
7798
|
* Confirm 2FA setup on the pending sign-in. The sign-in stays pending: show the recovery codes,
|
|
7799
|
-
* then `verifyTwoFactor` with the
|
|
7799
|
+
* then `verifyTwoFactor` with the next authenticator code finishes it.
|
|
7800
7800
|
*
|
|
7801
7801
|
* @param code - TOTP code from the authenticator app
|
|
7802
7802
|
* @returns Promise with the recovery codes the user must save
|
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ var a = "__passflowAntiBot", o = (e, t) => {
|
|
|
11
11
|
if (typeof e != "object" || !e) return;
|
|
12
12
|
let t = e[a];
|
|
13
13
|
return typeof t == "object" && t ? t : void 0;
|
|
14
|
-
}, c = "0.39.
|
|
14
|
+
}, c = "0.39.3", l = "X-Passflow-Clientid", u = "Authorization", d = "X-Passflow-DeviceId", f = "X-Passflow-DeviceType", p = "X-Passflow-Anti-Bot", m = "X-Passflow-Agent-Tool", h = "passflow_auth", g = c, _ = [
|
|
15
15
|
"id",
|
|
16
16
|
"offline",
|
|
17
17
|
"openid"
|
|
@@ -7554,22 +7554,19 @@ var Ea = 10, Da = "The sign-in answered with a PKCE code, but its verifier is go
|
|
|
7554
7554
|
"id_token"
|
|
7555
7555
|
], n = new URLSearchParams(e.search), r = new URLSearchParams(e.hash?.substring(1)), i = t.some((e) => n.get(e)), a = t.some((e) => r.get(e));
|
|
7556
7556
|
if (!a && !i) return;
|
|
7557
|
-
|
|
7557
|
+
let o = [
|
|
7558
7558
|
...t,
|
|
7559
7559
|
"client_challenge",
|
|
7560
|
-
|
|
7561
|
-
]
|
|
7562
|
-
let
|
|
7560
|
+
"user_state"
|
|
7561
|
+
];
|
|
7562
|
+
for (let e of [...o, ...i ? ["state"] : []]) n.delete(e);
|
|
7563
|
+
let s = n.toString(), c = e.hash ?? "";
|
|
7563
7564
|
if (a) {
|
|
7564
|
-
for (let e of [
|
|
7565
|
-
...t,
|
|
7566
|
-
"client_challenge",
|
|
7567
|
-
"state"
|
|
7568
|
-
]) r.delete(e);
|
|
7565
|
+
for (let e of [...o, "state"]) r.delete(e);
|
|
7569
7566
|
let e = r.toString();
|
|
7570
|
-
|
|
7567
|
+
c = e ? `#${e}` : "";
|
|
7571
7568
|
}
|
|
7572
|
-
this.platform.replaceUrl(e.pathname + (
|
|
7569
|
+
this.platform.replaceUrl(e.pathname + (s ? `?${s}` : "") + c);
|
|
7573
7570
|
}
|
|
7574
7571
|
setTokensToCacheFromLocalStorage() {
|
|
7575
7572
|
let e = this.storageManager.getTokens();
|