@passflow/core 0.17.0 → 0.19.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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1021 -716
- package/dist/index.mjs.map +1 -1
- package/dist/lib/api/auth.d.ts +3 -1
- package/dist/lib/api/auth.d.ts.map +1 -1
- package/dist/lib/api/model.d.ts +50 -0
- package/dist/lib/api/model.d.ts.map +1 -1
- package/dist/lib/api/two-factor.d.ts +16 -7
- package/dist/lib/api/two-factor.d.ts.map +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/passflow.d.ts +49 -4
- package/dist/lib/passflow.d.ts.map +1 -1
- package/dist/lib/pkce.d.ts +13 -0
- package/dist/lib/pkce.d.ts.map +1 -0
- package/dist/lib/services/auth-service.d.ts +56 -1
- package/dist/lib/services/auth-service.d.ts.map +1 -1
- package/dist/lib/services/two-factor-service.d.ts +40 -7
- package/dist/lib/services/two-factor-service.d.ts.map +1 -1
- package/dist/lib/store.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -1
|
@@ -1,18 +1,32 @@
|
|
|
1
|
-
import { RegisteredTwoFactorMethod, TwoFactorAlternativeRequest, TwoFactorChallengeRequest, TwoFactorChallengeResponse, TwoFactorConfirmResponse, TwoFactorDisableResponse, TwoFactorMethod, TwoFactorRecoveryResponse, TwoFactorRegenerateResponse, TwoFactorSetupMagicLinkSession, TwoFactorSetupMagicLinkValidationResponse, TwoFactorSetupResponse, TwoFactorStatusResponse, TwoFactorVerifyRequestV2, TwoFactorVerifyResponse, TwoFactorVerifyResponseV2 } from '../api/model';
|
|
1
|
+
import { RegisteredTwoFactorMethod, TwoFactorAlternativeRequest, TwoFactorChallengeRequest, TwoFactorChallengeResponse, TwoFactorCompletionOptions, TwoFactorConfirmResponse, TwoFactorDisableResponse, TwoFactorMethod, TwoFactorRecoveryResponse, TwoFactorRegenerateResponse, TwoFactorSetupMagicLinkSession, TwoFactorSetupMagicLinkValidationResponse, TwoFactorSetupResponse, TwoFactorStatusResponse, TwoFactorTrustedDevice, TwoFactorVerifyRequestV2, TwoFactorVerifyResponse, TwoFactorVerifyResponseV2 } from '../api/model';
|
|
2
2
|
import { TwoFactorApiClient } from '../api/two-factor';
|
|
3
3
|
import { PassflowStore } from '../store';
|
|
4
|
+
import type { Tokens } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Owns what a second factor's answer turns into: this service never stores tokens
|
|
7
|
+
* or holds the PKCE verifier. `AuthService` implements it.
|
|
8
|
+
*/
|
|
9
|
+
export interface SignInCompleter {
|
|
10
|
+
/** Redeems the code a second factor answered with on a PKCE sign-in, and applies the tokens. */
|
|
11
|
+
completePkceSignIn(code: string): Promise<Tokens>;
|
|
12
|
+
/** Applies the tokens a second factor answered with directly. */
|
|
13
|
+
applyTokens(tokens: Tokens): Promise<void>;
|
|
14
|
+
hasPendingPkceSignIn(): boolean;
|
|
15
|
+
forgetPkceSignIn(): void;
|
|
16
|
+
}
|
|
4
17
|
/**
|
|
5
18
|
* Service for managing Two-Factor Authentication
|
|
6
19
|
*/
|
|
7
20
|
export declare class TwoFactorService {
|
|
8
21
|
private twoFactorApi;
|
|
9
22
|
private subscribeStore;
|
|
23
|
+
private signInCompleter?;
|
|
10
24
|
private partialAuthState?;
|
|
11
25
|
private readonly PARTIAL_AUTH_TIMEOUT_MS;
|
|
12
26
|
private readonly SESSION_STORAGE_KEY;
|
|
13
27
|
private totpDigits;
|
|
14
28
|
private magicLinkSession?;
|
|
15
|
-
constructor(twoFactorApi: TwoFactorApiClient, subscribeStore: PassflowStore);
|
|
29
|
+
constructor(twoFactorApi: TwoFactorApiClient, subscribeStore: PassflowStore, signInCompleter?: SignInCompleter | undefined);
|
|
16
30
|
/**
|
|
17
31
|
* Emit error event and throw the error
|
|
18
32
|
* Helper method to ensure errors are properly emitted to subscribers
|
|
@@ -35,13 +49,17 @@ export declare class TwoFactorService {
|
|
|
35
49
|
/**
|
|
36
50
|
* Verify TOTP code during login
|
|
37
51
|
* Completes authentication if successful
|
|
52
|
+
*
|
|
53
|
+
* @param options.trustDevice - ask the server to trust this device for later sign-ins
|
|
38
54
|
*/
|
|
39
|
-
verify(code: string): Promise<TwoFactorVerifyResponse>;
|
|
55
|
+
verify(code: string, options?: TwoFactorCompletionOptions): Promise<TwoFactorVerifyResponse>;
|
|
40
56
|
/**
|
|
41
57
|
* Use recovery code for authentication
|
|
42
58
|
* Completes authentication if successful
|
|
59
|
+
*
|
|
60
|
+
* @param options.trustDevice - ask the server to trust this device for later sign-ins
|
|
43
61
|
*/
|
|
44
|
-
useRecoveryCode(code: string): Promise<TwoFactorRecoveryResponse>;
|
|
62
|
+
useRecoveryCode(code: string, options?: TwoFactorCompletionOptions): Promise<TwoFactorRecoveryResponse>;
|
|
45
63
|
/**
|
|
46
64
|
* Disable 2FA (requires TOTP verification)
|
|
47
65
|
*/
|
|
@@ -65,6 +83,18 @@ export declare class TwoFactorService {
|
|
|
65
83
|
* Called on logout or successful verification
|
|
66
84
|
*/
|
|
67
85
|
clearPartialAuthState(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Ends the pending sign-in with the second factor's answer. On a PKCE app that
|
|
88
|
+
* answer is a code, redeemed and replaced by the tokens, so no caller or
|
|
89
|
+
* subscriber ever gets a code where tokens belong. Tokens are applied once, by
|
|
90
|
+
* the completer, in the app's delivery mode. The pending state goes only after
|
|
91
|
+
* that has worked, except when no verifier can ever redeem the code.
|
|
92
|
+
*/
|
|
93
|
+
private finishSignIn;
|
|
94
|
+
/**
|
|
95
|
+
* The 2FA token of the sign-in waiting on its second factor, if any.
|
|
96
|
+
*/
|
|
97
|
+
private pendingTfaToken;
|
|
68
98
|
/**
|
|
69
99
|
* Attempt to recover partial auth state from sessionStorage
|
|
70
100
|
* Called before verification operations to handle page refresh
|
|
@@ -142,6 +172,7 @@ export declare class TwoFactorService {
|
|
|
142
172
|
requestChallenge(payload: TwoFactorChallengeRequest): Promise<TwoFactorChallengeResponse>;
|
|
143
173
|
/**
|
|
144
174
|
* Verify 2FA challenge (v2)
|
|
175
|
+
* Set `trust_device` on the payload to ask the server to trust this device.
|
|
145
176
|
*/
|
|
146
177
|
verifyV2(payload: TwoFactorVerifyRequestV2): Promise<TwoFactorVerifyResponseV2>;
|
|
147
178
|
/**
|
|
@@ -149,11 +180,13 @@ export declare class TwoFactorService {
|
|
|
149
180
|
*/
|
|
150
181
|
switchToAlternative(payload: TwoFactorAlternativeRequest): Promise<TwoFactorChallengeResponse>;
|
|
151
182
|
/**
|
|
152
|
-
*
|
|
183
|
+
* List the devices the user trusted to skip the second factor on this app.
|
|
184
|
+
* The one this request came from has `current: true`.
|
|
153
185
|
*/
|
|
154
|
-
getTrustedDevices(): Promise<
|
|
186
|
+
getTrustedDevices(): Promise<TwoFactorTrustedDevice[]>;
|
|
155
187
|
/**
|
|
156
|
-
* Revoke trusted device
|
|
188
|
+
* Revoke a trusted device; its next sign-in asks for the second factor again.
|
|
189
|
+
* Rejects with the server's 404 when the user has no such device.
|
|
157
190
|
*/
|
|
158
191
|
revokeTrustedDevice(deviceId: string): Promise<void>;
|
|
159
192
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"two-factor-service.d.ts","sourceRoot":"","sources":["../../../lib/services/two-factor-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACxB,eAAe,EACf,yBAAyB,EACzB,2BAA2B,EAC3B,8BAA8B,EAC9B,yCAAyC,EACzC,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAiB,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"two-factor-service.d.ts","sourceRoot":"","sources":["../../../lib/services/two-factor-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACxB,eAAe,EACf,yBAAyB,EACzB,2BAA2B,EAC3B,8BAA8B,EAC9B,yCAAyC,EACzC,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAiB,aAAa,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAqBvC;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,gGAAgG;IAChG,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAClD,iEAAiE;IACjE,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,oBAAoB,IAAI,OAAO,CAAC;IAChC,gBAAgB,IAAI,IAAI,CAAC;CAC1B;AAOD;;GAEG;AACH,qBAAa,gBAAgB;IAazB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,eAAe,CAAC;IAd1B,OAAO,CAAC,gBAAgB,CAAC,CAAmB;IAC5C,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAiB;IACzD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAA4B;IAIhE,OAAO,CAAC,UAAU,CAAY;IAG9B,OAAO,CAAC,gBAAgB,CAAC,CAAiC;gBAGhD,YAAY,EAAE,kBAAkB,EAChC,cAAc,EAA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;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,CAAC,SAAS,aAAa,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC9F;AAED;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,WAAW,CAAiE;IAEpF;;;;OAIG;IACH,SAAS,CAAC,UAAU,EAAE,kBAAkB,EAAE,MAAM,CAAC,EAAE,aAAa,EAAE,GAAG,IAAI;IASzE;;;;OAIG;IACH,WAAW,CAAC,UAAU,EAAE,kBAAkB,EAAE,MAAM,CAAC,EAAE,aAAa,EAAE,GAAG,IAAI;IAiB3E;;;;OAIG;IACH,MAAM,CAAC,CAAC,SAAS,aAAa,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,IAAI;CAOvF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../lib/index.ts","../lib/passflow.ts","../lib/store.ts","../lib/api/app.ts","../lib/api/auth.ts","../lib/api/axios-client.ts","../lib/api/cli-auth.ts","../lib/api/index.ts","../lib/api/invitation.ts","../lib/api/model.ts","../lib/api/setting.ts","../lib/api/tenant.ts","../lib/api/two-factor.ts","../lib/api/upgrade.ts","../lib/api/user.ts","../lib/constants/index.ts","../lib/device/index.ts","../lib/interceptors/fetch-registry.ts","../lib/m2m/client.ts","../lib/m2m/errors.ts","../lib/m2m/index.ts","../lib/m2m/types.ts","../lib/platform/index.ts","../lib/platform/types.ts","../lib/platform/web-adapter.ts","../lib/services/auth-service.ts","../lib/services/index.ts","../lib/services/invitation-service.ts","../lib/services/logger.ts","../lib/services/tenant-service.ts","../lib/services/tenant-user-membership.ts","../lib/services/token-cache-service.ts","../lib/services/two-factor-service.ts","../lib/services/user-service.ts","../lib/storage/index.ts","../lib/token/delivery-manager.ts","../lib/token/index.ts","../lib/token/membership.ts","../lib/token/service.ts","../lib/token/token.ts","../lib/types/index.ts","../lib/upgrade/acr.ts","../lib/upgrade/axios-adapter.ts","../lib/upgrade/challenge.ts","../lib/upgrade/client.ts","../lib/upgrade/controller.ts","../lib/upgrade/core.ts","../lib/upgrade/errors.ts","../lib/upgrade/facade.ts","../lib/upgrade/factors.ts","../lib/upgrade/fetch-adapter.ts","../lib/upgrade/index.ts","../lib/upgrade/markers.ts","../lib/upgrade/replay.ts","../lib/upgrade/select.ts","../lib/upgrade/session.ts","../lib/upgrade/snapshot.ts","../lib/upgrade/transport.ts","../lib/utils/validation.ts"],"version":"5.9.3"}
|
|
1
|
+
{"root":["../lib/index.ts","../lib/passflow.ts","../lib/pkce.ts","../lib/store.ts","../lib/api/app.ts","../lib/api/auth.ts","../lib/api/axios-client.ts","../lib/api/cli-auth.ts","../lib/api/index.ts","../lib/api/invitation.ts","../lib/api/model.ts","../lib/api/setting.ts","../lib/api/tenant.ts","../lib/api/two-factor.ts","../lib/api/upgrade.ts","../lib/api/user.ts","../lib/constants/index.ts","../lib/device/index.ts","../lib/interceptors/fetch-registry.ts","../lib/m2m/client.ts","../lib/m2m/errors.ts","../lib/m2m/index.ts","../lib/m2m/types.ts","../lib/platform/index.ts","../lib/platform/types.ts","../lib/platform/web-adapter.ts","../lib/services/auth-service.ts","../lib/services/index.ts","../lib/services/invitation-service.ts","../lib/services/logger.ts","../lib/services/tenant-service.ts","../lib/services/tenant-user-membership.ts","../lib/services/token-cache-service.ts","../lib/services/two-factor-service.ts","../lib/services/user-service.ts","../lib/storage/index.ts","../lib/token/delivery-manager.ts","../lib/token/index.ts","../lib/token/membership.ts","../lib/token/service.ts","../lib/token/token.ts","../lib/types/index.ts","../lib/upgrade/acr.ts","../lib/upgrade/axios-adapter.ts","../lib/upgrade/challenge.ts","../lib/upgrade/client.ts","../lib/upgrade/controller.ts","../lib/upgrade/core.ts","../lib/upgrade/errors.ts","../lib/upgrade/facade.ts","../lib/upgrade/factors.ts","../lib/upgrade/fetch-adapter.ts","../lib/upgrade/index.ts","../lib/upgrade/markers.ts","../lib/upgrade/replay.ts","../lib/upgrade/select.ts","../lib/upgrade/session.ts","../lib/upgrade/snapshot.ts","../lib/upgrade/transport.ts","../lib/utils/validation.ts"],"version":"5.9.3"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@passflow/core",
|
|
3
3
|
"description": "Passflow JS SDK",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.19.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"test:services": "vitest run tests/services",
|
|
30
30
|
"test:coverage": "vitest run --coverage",
|
|
31
31
|
"test:ui": "vitest --ui",
|
|
32
|
+
"corpus:check": "node scripts/check-corpus.mjs",
|
|
32
33
|
"lint": "biome check .",
|
|
33
34
|
"lint:fix": "biome check . --apply",
|
|
34
35
|
"format": "biome format . --write",
|