@getpara/shared 1.29.0 → 1.31.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/cjs/index.js +1 -0
- package/dist/cjs/schemas/permissionsV2.js +577 -6
- package/dist/cjs/schemas/permissionsV2UserParameters.js +85 -0
- package/dist/cjs/types/authFactor.js +9 -7
- package/dist/cjs/types/authState.js +15 -16
- package/dist/esm/index.js +1 -0
- package/dist/esm/schemas/permissionsV2.js +575 -5
- package/dist/esm/schemas/permissionsV2UserParameters.js +82 -0
- package/dist/esm/types/authFactor.js +9 -7
- package/dist/esm/types/authState.js +15 -16
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/schemas/permissionsV2.d.ts +12656 -513
- package/dist/types/schemas/permissionsV2.d.ts.map +1 -1
- package/dist/types/schemas/permissionsV2UserParameters.d.ts +468 -0
- package/dist/types/schemas/permissionsV2UserParameters.d.ts.map +1 -0
- package/dist/types/types/auth.d.ts +46 -0
- package/dist/types/types/auth.d.ts.map +1 -1
- package/dist/types/types/authFactor.d.ts +57 -23
- package/dist/types/types/authFactor.d.ts.map +1 -1
- package/dist/types/types/authState.d.ts +224 -88
- package/dist/types/types/authState.d.ts.map +1 -1
- package/dist/types/types/partner.d.ts +2 -0
- package/dist/types/types/partner.d.ts.map +1 -1
- package/dist/types/types/pending-transaction.d.ts +2 -0
- package/dist/types/types/pending-transaction.d.ts.map +1 -1
- package/dist/types/types/permissions.d.ts +25 -2
- package/dist/types/types/permissions.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { TOAuthMethod } from './auth.js';
|
|
2
2
|
import { TExternalWalletType, TExternalWallet } from './wallet.js';
|
|
3
3
|
/**
|
|
4
|
-
* Auth factors are the ways an account authenticates: the identity-bearing
|
|
5
|
-
*
|
|
6
|
-
* SECOND factors. This is the correct "authentication factor" model.
|
|
4
|
+
* Auth factors are the ways an account authenticates: the identity-bearing FIRST factors (email, phone,
|
|
5
|
+
* OAuth, external wallet) plus, going forward, SECOND factors.
|
|
7
6
|
*
|
|
8
|
-
* NOTE: distinct from the legacy `AuthMethod` enum (PASSWORD/PASSKEY/PIN/
|
|
9
|
-
*
|
|
10
|
-
* being retired with the enclave migration. Existing passkeys/PINs/passwords/
|
|
7
|
+
* NOTE: distinct from the legacy `AuthMethod` enum (PASSWORD/PASSKEY/PIN/BASIC_LOGIN) — legacy
|
|
8
|
+
* credential/unlock methods being retired with the enclave migration. Existing passkeys/PINs/passwords/
|
|
11
9
|
* TOTP are NEVER represented here — they stay in their own tables and age out.
|
|
12
10
|
*/
|
|
13
11
|
export declare const AUTH_FACTOR_TYPES: readonly ["EMAIL", "PHONE", "OAUTH", "PASSKEY", "PASSWORD", "PIN", "TOTP", "EXTERNAL_WALLET"];
|
|
@@ -15,26 +13,23 @@ export type TAuthFactorType = (typeof AUTH_FACTOR_TYPES)[number];
|
|
|
15
13
|
/** Which factor in the authentication sequence this is. */
|
|
16
14
|
export declare const AUTH_FACTOR_TIERS: readonly ["FIRST", "SECOND"];
|
|
17
15
|
export type TAuthFactorTier = (typeof AUTH_FACTOR_TIERS)[number];
|
|
18
|
-
export declare const AUTH_FACTOR_STATUSES: readonly ["PENDING", "VERIFIED", "REVOKED"];
|
|
16
|
+
export declare const AUTH_FACTOR_STATUSES: readonly ["PENDING", "VERIFIED", "UNVERIFIED", "REVOKED"];
|
|
19
17
|
export type TAuthFactorStatus = (typeof AUTH_FACTOR_STATUSES)[number];
|
|
20
18
|
/** How this factor came to be attached to the account (drives migration/audit). */
|
|
21
19
|
export declare const AUTH_FACTOR_PROVENANCES: readonly ["SIGNUP", "EXPLICIT_LINK", "IMPLICIT_MERGE_LEGACY", "MIGRATION"];
|
|
22
20
|
export type TAuthFactorProvenance = (typeof AUTH_FACTOR_PROVENANCES)[number];
|
|
23
21
|
/**
|
|
24
|
-
* Provider behind a factor: OAuth providers (GOOGLE/APPLE/…) or external-wallet
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* providers. The psql column stays plain `text`.
|
|
22
|
+
* Provider behind a factor: OAuth providers (GOOGLE/APPLE/…) or external-wallet providers
|
|
23
|
+
* (METAMASK/PHANTOM/…). Typed as the known unions for autocomplete but left open to any string so we
|
|
24
|
+
* aren't limited to today's providers. The psql column stays plain `text`.
|
|
28
25
|
*/
|
|
29
26
|
export type TAuthFactorProvider = TOAuthMethod | TExternalWallet | (string & {});
|
|
30
27
|
/**
|
|
31
|
-
* Canonical shape of an auth factor (the `auth_factors` row) — the thin
|
|
32
|
-
*
|
|
33
|
-
* backend and new SDKs.
|
|
28
|
+
* Canonical shape of an auth factor (the `auth_factors` row) — the thin identity/tier/status index over an
|
|
29
|
+
* account's login factors. Consumed by the backend and new SDKs.
|
|
34
30
|
*
|
|
35
|
-
* The credential secret (
|
|
36
|
-
*
|
|
37
|
-
* biometrics / two_factor_authentications). In E1 the secret-bearing types are
|
|
31
|
+
* The credential secret (PASSKEY/PASSWORD/PIN/TOTP) is NOT stored here; `mechanicId` points at the row in the
|
|
32
|
+
* mechanic table (passwords / biometrics / two_factor_authentications). In E1 the secret-bearing types are
|
|
38
33
|
* never populated and `mechanicId` stays null.
|
|
39
34
|
*/
|
|
40
35
|
export type AuthFactor<D extends Date | string = Date> = {
|
|
@@ -53,9 +48,8 @@ export type AuthFactor<D extends Date | string = Date> = {
|
|
|
53
48
|
metadata?: Record<string, unknown> | null;
|
|
54
49
|
provenance: TAuthFactorProvenance;
|
|
55
50
|
/**
|
|
56
|
-
* FK to the mechanic-table row holding the secret (
|
|
57
|
-
*
|
|
58
|
-
* Currently always null.
|
|
51
|
+
* FK to the mechanic-table row holding the secret (PASSKEY/PASSWORD/PIN/TOTP). Exactly one is set on a
|
|
52
|
+
* secret-bearing factor; all null otherwise. Currently always null.
|
|
59
53
|
*/
|
|
60
54
|
passwordId?: string | null;
|
|
61
55
|
biometricId?: string | null;
|
|
@@ -66,9 +60,49 @@ export type AuthFactor<D extends Date | string = Date> = {
|
|
|
66
60
|
updatedAt: D;
|
|
67
61
|
};
|
|
68
62
|
/**
|
|
69
|
-
* A
|
|
70
|
-
*
|
|
71
|
-
*
|
|
63
|
+
* A display-ready projection of an auth factor for the account-management UI (list / unlink). DE-NORMALIZED
|
|
64
|
+
* for presentation vs the raw `AuthFactor` row: `identifier` is the human value (an OAuth factor's
|
|
65
|
+
* `"<provider>:<subject>"` stripped back to `<subject>`, matching the legacy linked-account UI), and
|
|
66
|
+
* `displayName`/`pfpUrl` are lifted out of `metadata`. The two flags carry the unlink guardrails to the
|
|
67
|
+
* client so the UI can disable the control without re-deriving the rule: `isCurrentSessionFactor` marks the
|
|
68
|
+
* factor that authenticated the calling session, `isUnlinkable` is false for that factor AND for the
|
|
69
|
+
* account's last remaining usable factor. Covers every listable type: EMAIL / PHONE / OAUTH /
|
|
70
|
+
* EXTERNAL_WALLET / CUSTOM_OAUTH+CUSTOM_OIDC (both carried on OAUTH). (ENG-7075)
|
|
71
|
+
*/
|
|
72
|
+
export type AuthFactorView<D extends Date | string = Date> = {
|
|
73
|
+
id: string;
|
|
74
|
+
type: TAuthFactorType;
|
|
75
|
+
/** OAuth provider (GOOGLE/…/CUSTOM_OAUTH/CUSTOM_OIDC) or wallet provider (METAMASK/…). */
|
|
76
|
+
provider?: TAuthFactorProvider | null;
|
|
77
|
+
/** Human identifier: email / E.164 phone / wallet address / OAuth subject (de-namespaced from the factor). */
|
|
78
|
+
identifier: string;
|
|
79
|
+
/** Chain for EXTERNAL_WALLET factors. */
|
|
80
|
+
chainType?: TExternalWalletType | null;
|
|
81
|
+
/** Provider display name (lifted from metadata), when the provider supplied one. */
|
|
82
|
+
displayName?: string;
|
|
83
|
+
/** Provider profile-picture URL (lifted from metadata), when available. */
|
|
84
|
+
pfpUrl?: string;
|
|
85
|
+
status: TAuthFactorStatus;
|
|
86
|
+
provenance: TAuthFactorProvenance;
|
|
87
|
+
/** The partner-configured connection (partner_oauth_configs.handle) that created this factor, when any. */
|
|
88
|
+
providerConfigHandle?: string | null;
|
|
89
|
+
/** The custom connection's human label (partner_oauth_configs.label, e.g. "Acme SSO") — so the UI shows the
|
|
90
|
+
* connection name instead of a slug/subject. Custom OAuth/OIDC only. (ENG-7075) */
|
|
91
|
+
connectionLabel?: string;
|
|
92
|
+
createdAt: D;
|
|
93
|
+
verifiedAt?: D | null;
|
|
94
|
+
/** True for the exact factor the calling session authenticated with — never unlinkable (guardrail b). */
|
|
95
|
+
isCurrentSessionFactor: boolean;
|
|
96
|
+
/** False for the current-session factor and for the account's last remaining usable factor (guardrails a+b). */
|
|
97
|
+
isUnlinkable: boolean;
|
|
98
|
+
};
|
|
99
|
+
/** Response of the v2 list-factors endpoint. */
|
|
100
|
+
export type ListAuthFactorsResponse<D extends Date | string = Date> = {
|
|
101
|
+
factors: AuthFactorView<D>[];
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* A wallet connected for use only (not an auth factor). Also the billing record for connection-only MAUs.
|
|
105
|
+
* `userId` is null for a pure connection (one with no associated account).
|
|
72
106
|
*/
|
|
73
107
|
export type ConnectedWallet<D extends Date | string = Date> = {
|
|
74
108
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authFactor.d.ts","sourceRoot":"","sources":["../../../src/types/authFactor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnE
|
|
1
|
+
{"version":3,"file":"authFactor.d.ts","sourceRoot":"","sources":["../../../src/types/authFactor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnE;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,+FASpB,CAAC;AAEX,MAAM,MAA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AAC,CAAC,SAAS,IAAI,GAAG,MAAM,GAAG,IAAI,IAAI;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,mBAAmB,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gBAAgB,EAAE,CAAC,CAAC;IACpB,eAAe,EAAE,CAAC,CAAC;IACnB,SAAS,EAAE,CAAC,CAAC;IACb,SAAS,EAAE,CAAC,CAAC;CACd,CAAC"}
|
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Status-model auth envelope returned by
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* This is the canonical auth contract — new SDKs consume it directly instead of
|
|
9
|
-
* a parallel client mirror. (ENG-6910)
|
|
2
|
+
* Status-model auth envelope returned by `/v2/auth`, consumed by the backend and new SDKs.
|
|
3
|
+
* Clerk-style: a single `status` drives the client, with typed per-status fields. Statuses are added
|
|
4
|
+
* additively; an unrecognized one is treated as not-yet-complete (show generic / hand off), never an
|
|
5
|
+
* error (forward-compat). The canonical auth contract — new SDKs consume it directly, not a parallel
|
|
6
|
+
* client mirror. (ENG-6910)
|
|
10
7
|
*/
|
|
11
|
-
import type {
|
|
8
|
+
import type { AuthFactorView } from './authFactor.js';
|
|
9
|
+
import type { MfaChallenge, TAuthMethod, TelegramAuthResponse, TOAuthMethod } from './auth.js';
|
|
12
10
|
import type { DeliveryChannel } from './otp.js';
|
|
13
11
|
import type { TWalletType } from './wallet.js';
|
|
14
12
|
/**
|
|
15
|
-
* Flow statuses. Only `needs_verification` and `authenticated` are emitted today;
|
|
16
|
-
*
|
|
17
|
-
* slices that emit them land (credential setup, cross-method link prompt).
|
|
13
|
+
* Flow statuses. Only `needs_verification` and `authenticated` are emitted today; the rest are
|
|
14
|
+
* reserved for forward-stability, emitted as their slices land (credential setup, link prompt).
|
|
18
15
|
*/
|
|
19
|
-
export declare const AUTH_STATUSES: readonly ["needs_verification", "needs_credential", "needs_link", "needs_second_factor", "authenticated"];
|
|
16
|
+
export declare const AUTH_STATUSES: readonly ["needs_verification", "needs_credential", "needs_link", "needs_second_factor", "authenticated", "linked", "needs_step_up", "unlinked"];
|
|
20
17
|
export type TAuthStatus = (typeof AUTH_STATUSES)[number];
|
|
21
18
|
/**
|
|
22
|
-
* First-factor methods
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
19
|
+
* First-factor methods `/v2/auth` handles: email/phone via a delivered one-time code; external-wallet
|
|
20
|
+
* via a SIWE signature; passkey via a WebAuthn assertion (usernameless — resolved from the credential at
|
|
21
|
+
* `continue`); oauth via a provider redirect (provider rides on the flow, account resolved at
|
|
22
|
+
* `continue`). (ENG-6911)
|
|
26
23
|
*/
|
|
27
24
|
export declare const AUTH_FLOW_METHODS: readonly ["EMAIL", "PHONE", "EXTERNAL_WALLET", "PASSKEY", "OAUTH"];
|
|
28
25
|
export type TAuthFlowMethod = (typeof AUTH_FLOW_METHODS)[number];
|
|
@@ -38,132 +35,243 @@ export type AuthVerification = {
|
|
|
38
35
|
};
|
|
39
36
|
/**
|
|
40
37
|
* The auth-flow envelope. `flowId` + `expiresAt` are the resumable handle
|
|
41
|
-
* (`GET /v2/auth/flows/{flowId}`). `accountId` stays null until `authenticated`
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
|
|
38
|
+
* (`GET /v2/auth/flows/{flowId}`). `accountId` stays null until `authenticated`/`linked` so a pending
|
|
39
|
+
* flow never reveals whether the account already existed (enumeration-safe). Session is cookie-based —
|
|
40
|
+
* `authenticated` + the `Set-Cookie` is the signal, so no token in the body.
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* Coarse summary of the EXISTING account on a `needs_link` collision — enough for the linking UI to show the
|
|
44
|
+
* value-prop ("link to reuse these N wallets") without exposing the account's id or identifier. Ships only once
|
|
45
|
+
* the incoming identity is proven (the needs_link prompt is post-proof). (ENG-7075)
|
|
46
|
+
*/
|
|
47
|
+
export type LinkExistingAccountSummary = {
|
|
48
|
+
/** How many wallets the existing account holds. */
|
|
49
|
+
walletCount: number;
|
|
50
|
+
/** The account's login methods (its OAuth redirect providers + EMAIL/PHONE). The card composes these into one
|
|
51
|
+
* label ("Google + Twitter") so a single account that owns several reads as ONE account, not several. */
|
|
52
|
+
methods: (TAuthFlowMethod | TOAuthMethod)[];
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* One selectable account when a `needs_link` email is vouched by MORE THAN ONE existing account. `handle` is an
|
|
56
|
+
* opaque, flow-scoped reference (never the account id) the client passes back as `link.handle` to choose which
|
|
57
|
+
* account to link into; the server maps it to the real account. (ENG-7075)
|
|
45
58
|
*/
|
|
59
|
+
export type LinkCandidate = LinkExistingAccountSummary & {
|
|
60
|
+
handle: string;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* One step-up option for proving the existing account. OAuth providers carry only `method` (the redirect
|
|
64
|
+
* handshake identifies the account). EMAIL/PHONE carry a per-factor `handle` (opaque factor reference — never the
|
|
65
|
+
* row id's meaning) the client passes back as `link.handle` to pick THAT specific address/number, plus a
|
|
66
|
+
* `maskedIdentifier` for display (e.g. "t•••@gmail.com", "•••1234") — the full value never leaves the backend.
|
|
67
|
+
* An account with several emails/phones surfaces one option per factor so the user chooses which to verify.
|
|
68
|
+
* `handle`/`maskedIdentifier` are present only when the INCOMING identity is itself proven (a trusted+verified
|
|
69
|
+
* provider email, or an OTP the caller passed); an unverifiable claim gets bare method names. (ENG-6911)
|
|
70
|
+
*/
|
|
71
|
+
export type StepUpOption = {
|
|
72
|
+
method: TAuthFlowMethod | TOAuthMethod;
|
|
73
|
+
handle?: string;
|
|
74
|
+
maskedIdentifier?: string;
|
|
75
|
+
/**
|
|
76
|
+
* The real identifier, present ONLY on the authenticated factor-link rail (`needs_step_up`), where the caller
|
|
77
|
+
* is already signed in AS this factor — masking there hides nothing they cannot already see, and makes "where
|
|
78
|
+
* did the code go" needlessly unclear. Never sent on a `needs_link` collision: there the caller may not own
|
|
79
|
+
* the account, so `maskedIdentifier` is all they get. Prefer this for display when present. (ENG-7075)
|
|
80
|
+
*/
|
|
81
|
+
identifier?: string;
|
|
82
|
+
};
|
|
46
83
|
export type AuthState = {
|
|
47
84
|
status: TAuthStatus;
|
|
48
85
|
flowId: string;
|
|
49
86
|
/**
|
|
50
|
-
* ISO-8601 expiry of the flow handle. Present while
|
|
51
|
-
*
|
|
87
|
+
* ISO-8601 expiry of the flow handle. Present while pending; omitted once `authenticated` (the flow
|
|
88
|
+
* is gone, the session has its own lifetime).
|
|
52
89
|
*/
|
|
53
90
|
expiresAt?: string;
|
|
54
|
-
/** Resolved account id; null until `status
|
|
91
|
+
/** Resolved account id; null until `status` is `'authenticated'` or `'linked'`. */
|
|
55
92
|
accountId?: string | null;
|
|
56
93
|
/**
|
|
57
94
|
* Whether this `/start` (or `authenticated`) *created a new account row* vs resumed an existing one. v2
|
|
58
|
-
* never discards an account, so a resumed
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
95
|
+
* never discards an account, so a resumed one — even a never-verified stub — reads `false`. CLIENT: decide
|
|
96
|
+
* setup-vs-unlock from **empty `authMethods`** (no credential ⇒ setup), not `isNewUser` alone — a
|
|
97
|
+
* resumed-but-unset-up account is `isNewUser: false` with no methods. Present on `authenticated` and, for
|
|
98
|
+
* account-resolved-at-start flows (email/phone, external wallet), on `needs_verification`. See the exposure
|
|
99
|
+
* note on `authMethods`. (ENG-7075)
|
|
63
100
|
*/
|
|
64
101
|
isNewUser?: boolean;
|
|
65
102
|
/**
|
|
66
103
|
* Whether the account's MPC user-share IS or WILL BE enclave-custodied (basic-login) vs credential-protected.
|
|
67
|
-
* The authoritative key-share-path signal —
|
|
68
|
-
* "`BASIC_LOGIN` ⇒ enclave" rule. For a not-yet-set-up account
|
|
69
|
-
*
|
|
70
|
-
* the
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* (email/phone, external wallet). (ENG-7075)
|
|
104
|
+
* The authoritative key-share-path signal — backend-asserted so the SDK doesn't re-encode the
|
|
105
|
+
* "`BASIC_LOGIN` ⇒ enclave" rule. For a not-yet-set-up account on a BASIC_LOGIN partner this predicts `true`
|
|
106
|
+
* from the CURRENT partner's methods (so the first wallet is minted enclave-custodied) — hence partner-scoped:
|
|
107
|
+
* the same account can read differently across partners. Present on `authenticated` (mirrors the session
|
|
108
|
+
* stamp) and, for account-resolved-at-start flows (email/phone, external wallet), on `needs_verification`
|
|
109
|
+
* (emitted at `/start`, before any mint). (ENG-7075)
|
|
74
110
|
*/
|
|
75
111
|
isEnclaveUser?: boolean;
|
|
76
112
|
/**
|
|
77
|
-
* The account's enrolled auth methods
|
|
78
|
-
* (`PASSKEY`/`PASSWORD`/`PIN`); the enclave decision itself comes from `isEnclaveUser
|
|
79
|
-
*
|
|
80
|
-
* account-resolved-at-start flows (email/phone, external wallet)
|
|
81
|
-
* pre-verification screen (which method to offer).
|
|
113
|
+
* The account's enrolled auth methods, read by the SDK for the credential/method UI
|
|
114
|
+
* (`PASSKEY`/`PASSWORD`/`PIN`); the enclave decision itself comes from `isEnclaveUser`. Mirrors the legacy
|
|
115
|
+
* `done` stage's `authMethods`. Present on `authenticated`, and on `needs_verification` for
|
|
116
|
+
* account-resolved-at-start flows (email/phone, external wallet) to personalize the pre-verification screen.
|
|
82
117
|
*
|
|
83
|
-
* EXPOSURE NOTE: emitting this (
|
|
84
|
-
* `needs_verification` is pre-ownership-proof, so it discloses account existence + auth posture
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* (
|
|
91
|
-
*
|
|
92
|
-
*
|
|
118
|
+
* EXPOSURE NOTE: emitting this (plus `isNewUser`/`isEnclaveUser`/`hasPasswordWithoutPIN`) on
|
|
119
|
+
* `needs_verification` is pre-ownership-proof, so it discloses account existence + auth posture. The caller
|
|
120
|
+
* set is effectively PUBLIC, not partner-only: the `x-external-api-key` gating `/internal/v1/auth/start` is a
|
|
121
|
+
* publishable key shipped in every partner's frontend bundle and CORS is open, so anyone can lift it and
|
|
122
|
+
* probe `does this address have a Para account / how is it protected`. Deliberate: the client needs it to
|
|
123
|
+
* render the pre-verification screen, and the same data is already visible on any Para-integrated site. We
|
|
124
|
+
* still withhold `accountId`/PII (null until `authenticated`/`linked`) — STRICTER than legacy
|
|
125
|
+
* (`/users/init`'s login stage returned `userId`); "parity with legacy" is only directional (legacy emits a
|
|
126
|
+
* method list only for accounts passing `userIsComplete`). SIGNED OFF (security review, 2026-09-16): measured
|
|
127
|
+
* against `/users/exists` (keyed calls from any origin) and the legacy `stage:'login'` response (which returns
|
|
128
|
+
* `userId` + `loginAuthMethods` pre-OTP), v2 discloses at or below that level, behind `userCreateRateLimiter`.
|
|
129
|
+
* (ENG-7075)
|
|
93
130
|
*/
|
|
94
131
|
authMethods?: TAuthMethod[];
|
|
95
132
|
/**
|
|
96
|
-
* Whether the account has a real (non-PIN) password. `authMethods` reports `PASSWORD` even for a
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
133
|
+
* Whether the account has a real (non-PIN) password. `authMethods` reports `PASSWORD` even for a PIN-only
|
|
134
|
+
* account (legacy-SDK compat), so the SDK needs this to distinguish password from PIN. Mirrors the legacy
|
|
135
|
+
* `login` stage's field. Present on `authenticated`, and on `needs_verification` for
|
|
136
|
+
* account-resolved-at-start flows (email/phone, external wallet). (ENG-7075)
|
|
100
137
|
*/
|
|
101
138
|
hasPasswordWithoutPIN?: boolean;
|
|
102
139
|
verification?: AuthVerification;
|
|
103
140
|
/** The login-time MFA challenge in flight (present while `needs_second_factor`). (ENG-6906) */
|
|
104
141
|
secondFactor?: MfaChallenge;
|
|
105
142
|
/**
|
|
106
|
-
* Present while `needs_verification` for a signature-based
|
|
107
|
-
*
|
|
143
|
+
* Present while `needs_verification` for a signature-based proof: the external-wallet SIWE message, the
|
|
144
|
+
* passkey WebAuthn challenge, or (email/phone, returning account holding a PASSKEY) the assertion challenge
|
|
145
|
+
* the portal's passkey-unlock signs. Sent back to `continue`. (ENG-6911, ENG-7075)
|
|
108
146
|
*/
|
|
109
147
|
challenge?: {
|
|
110
148
|
message: string;
|
|
111
149
|
};
|
|
112
150
|
/**
|
|
113
|
-
* Present while `needs_verification` for OAuth: the provider authorization URL
|
|
114
|
-
*
|
|
115
|
-
* with the `flowId` to finish. (ENG-6911)
|
|
151
|
+
* Present while `needs_verification` for OAuth: the provider authorization URL to navigate to. The
|
|
152
|
+
* provider calls our callback out-of-band; the client polls `continue` with the `flowId` to finish. (ENG-6911)
|
|
116
153
|
*/
|
|
117
154
|
redirect?: {
|
|
118
155
|
url: string;
|
|
119
156
|
};
|
|
120
157
|
/**
|
|
121
|
-
* Present when `status === 'needs_link'`:
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
158
|
+
* Present when `status === 'needs_link'`: this login's identifier collides with an account established by a
|
|
159
|
+
* different method. The account's id/identifier are never exposed — only a coarse, post-proof
|
|
160
|
+
* `existingAccount` summary (wallet count + a representative method) for the linking card. `mode` makes the
|
|
161
|
+
* required action explicit:
|
|
162
|
+
* - `{ mode: 'consent' }` — the incoming login already CRYPTOGRAPHICALLY proved the identifier (a trusted+
|
|
163
|
+
* verified OAuth email), so linking is one-click: `link: { action: 'link' }`, no method.
|
|
164
|
+
* - `{ mode: 'step_up', methods }` — identifier NOT self-proven, so prove the existing account by re-proving
|
|
165
|
+
* ONE of `methods` (each passed back as `link.method`): an OTP method (`EMAIL`/`PHONE`) or an OAuth provider
|
|
166
|
+
* (re-runs that handshake). Empty `methods` ⇒ no step-up available, client can only create separate.
|
|
167
|
+
* - `{ mode: 'select', candidates }` — the identifier is vouched by MORE THAN ONE existing account; the client
|
|
168
|
+
* picks one (`link: { action: 'select', handle }`), then the flow re-surfaces `step_up` for that account.
|
|
169
|
+
* The client either links (consent/step-up), selects a candidate, or creates a separate account
|
|
170
|
+
* (`{ action: 'create_separate' }`). Never auto-merge. `existingAccount` is ABSENT on `step_up` when the
|
|
171
|
+
* incoming identity is unproven (an untrusted provider's email claim): nothing about the colliding account is
|
|
172
|
+
* disclosed until the caller proves something. (ENG-6911, ENG-7075)
|
|
130
173
|
*/
|
|
131
174
|
link?: {
|
|
132
|
-
|
|
175
|
+
mode: 'consent';
|
|
176
|
+
existingAccount: LinkExistingAccountSummary;
|
|
177
|
+
} | {
|
|
178
|
+
mode: 'step_up';
|
|
179
|
+
methods: StepUpOption[];
|
|
180
|
+
existingAccount?: LinkExistingAccountSummary;
|
|
181
|
+
} | {
|
|
182
|
+
mode: 'select';
|
|
183
|
+
candidates: LinkCandidate[];
|
|
133
184
|
};
|
|
134
185
|
/**
|
|
135
|
-
* Present on `
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
186
|
+
* Present on `needs_step_up`: the ways the caller may prove the account they are adding a factor TO. One
|
|
187
|
+
* option per usable FIRST-tier factor the account actually holds — email/phone (OTP, `handle` = factor id),
|
|
188
|
+
* an OAuth provider (redirect), or an external wallet (SIWE, `handle` = factor id).
|
|
189
|
+
*
|
|
190
|
+
* Distinct from `link.mode === 'step_up'`, which proves a COLLIDING account the caller has not logged into.
|
|
191
|
+
* Here the caller already holds a session for the account; the proof exists because a session alone must not
|
|
192
|
+
* authorize binding a new login factor — otherwise a stolen session becomes permanent access. Identifiers are
|
|
193
|
+
* masked for display only; the server picks the factor a proof is judged against. (ENG-7075)
|
|
194
|
+
*/
|
|
195
|
+
stepUp?: {
|
|
196
|
+
methods: StepUpOption[];
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Present on `authenticated` for an OAuth/OIDC login: which provider authenticated the user (plus, for a
|
|
200
|
+
* partner-configured connection, its stable `configHandle` + human `label`) — so the client renders "via
|
|
201
|
+
* Acme SSO" and offers per-connection revoke. `configHandle`/`label` absent on Para-global creds. (ENG-7008)
|
|
139
202
|
*/
|
|
140
203
|
attribution?: {
|
|
141
204
|
provider: TOAuthMethod;
|
|
142
205
|
configHandle?: string;
|
|
143
206
|
label?: string;
|
|
144
207
|
};
|
|
208
|
+
/**
|
|
209
|
+
* Present on `linked`: the display-ready view of the factor the link flow just attached, so the client
|
|
210
|
+
* updates its factor list without a refetch. (ENG-7075)
|
|
211
|
+
*/
|
|
212
|
+
factor?: AuthFactorView<string>;
|
|
213
|
+
/**
|
|
214
|
+
* Present on `unlinked`: the account's factor list AFTER the revoke, so the client re-renders without a
|
|
215
|
+
* second round-trip — the same courtesy `linked` does with `factor`. (ENG-7075)
|
|
216
|
+
*/
|
|
217
|
+
factors?: AuthFactorView<string>[];
|
|
218
|
+
/**
|
|
219
|
+
* Present on `authenticated`: the initiating SDK session's lookup id — the session the backend bridged this
|
|
220
|
+
* login onto. The portal completes post-login (sessionAuth / share access) off THIS session, not a
|
|
221
|
+
* URL-threaded one, so the flow stays flowId-only (no sessionId on the OAuth callback URL). Omitted if the
|
|
222
|
+
* flow carried no initiating lookup (start always self-mints one). (ENG-7075)
|
|
223
|
+
*/
|
|
224
|
+
sessionLookupId?: string;
|
|
225
|
+
/**
|
|
226
|
+
* Present on `authenticated` for an EXTERNAL_WALLET login: full-Para-auth (mint an embedded Para wallet) vs
|
|
227
|
+
* verify-only (prove ownership, no wallet), carried from the `/start` body. The portal reads this to SKIP the
|
|
228
|
+
* post-login wallet tail (all-wallets fetch / keyshare / migration) for verify-only — the flowId-only v2
|
|
229
|
+
* portal URL never seeds the client's `authInfo.externalWallet`, so this is the portal's only
|
|
230
|
+
* server-authoritative verify-vs-full signal. (ENG-7075)
|
|
231
|
+
*/
|
|
232
|
+
externalWallet?: {
|
|
233
|
+
withFullParaAuth: boolean;
|
|
234
|
+
};
|
|
145
235
|
};
|
|
146
236
|
/**
|
|
147
|
-
* Request bodies for the method-agnostic `/v2/auth` surface —
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
|
|
237
|
+
* Request bodies for the method-agnostic `/v2/auth` surface — counterpart to the `AuthState` response,
|
|
238
|
+
* kept here so the request+response contract is single-source across the backend handlers (which validate
|
|
239
|
+
* `req.body`) and the SDK client (which constructs them). The backend still runtime-validates every field;
|
|
240
|
+
* these types are the compile-time contract, not the trust boundary. (ENG-6910 / ENG-6911)
|
|
241
|
+
*/
|
|
242
|
+
/**
|
|
243
|
+
* `start` body — discriminated by `method`; each carries only the fields its flow needs.
|
|
244
|
+
*
|
|
245
|
+
* `intent: 'link'` turns a start into an authenticated-user ADD-factor flow instead of a login: it binds to
|
|
246
|
+
* the CALLING SESSION's account (session cookie required), runs the same proof screen (OTP / SIWE / OAuth
|
|
247
|
+
* redirect), and `continue` ATTACHES the proven factor to that account (status `linked`) unless the identity
|
|
248
|
+
* already belongs to another account (409). PASSKEY does not participate in linking. Absent intent = normal
|
|
249
|
+
* login (unchanged). (ENG-7075)
|
|
152
250
|
*/
|
|
153
|
-
/** `start` body — discriminated by `method`. Each method carries only the fields its flow needs. */
|
|
154
251
|
export type AuthStartBody = {
|
|
155
252
|
method: 'EMAIL';
|
|
156
253
|
email: string;
|
|
254
|
+
intent?: 'link';
|
|
157
255
|
} | {
|
|
158
256
|
method: 'PHONE';
|
|
159
257
|
phone: string;
|
|
160
258
|
countryCode?: string;
|
|
259
|
+
intent?: 'link';
|
|
161
260
|
} | {
|
|
162
261
|
method: 'EXTERNAL_WALLET';
|
|
163
262
|
address: string;
|
|
164
263
|
chainType: TWalletType;
|
|
165
264
|
uri: string;
|
|
166
265
|
chainId?: string;
|
|
266
|
+
/**
|
|
267
|
+
* Full-Para-auth (mint an embedded Para wallet) vs verify-only (prove ownership, no wallet). Carried
|
|
268
|
+
* onto the flow at `/start` and mirrored back on the `authenticated` envelope
|
|
269
|
+
* (`externalWallet.withFullParaAuth`) so the portal can skip the wallet tail for verify-only — the
|
|
270
|
+
* flowId-only v2 portal URL never seeds `authInfo.externalWallet`, so this is its only
|
|
271
|
+
* server-authoritative signal. Absent ⇒ verify-only. (ENG-7075)
|
|
272
|
+
*/
|
|
273
|
+
withFullParaAuth?: boolean;
|
|
274
|
+
intent?: 'link';
|
|
167
275
|
} | {
|
|
168
276
|
method: 'PASSKEY';
|
|
169
277
|
} | {
|
|
@@ -171,13 +279,18 @@ export type AuthStartBody = {
|
|
|
171
279
|
provider: TOAuthMethod;
|
|
172
280
|
returnUrl?: string;
|
|
173
281
|
providerConfigHandle?: string;
|
|
282
|
+
/** Farcaster (POLL) only: the mobile app scheme baked into the SIWF channel's redirect for deeplink-back. */
|
|
283
|
+
appScheme?: string;
|
|
284
|
+
intent?: 'link';
|
|
174
285
|
};
|
|
175
|
-
/** How a `needs_link` collision is resolved: step up to the existing account, or fork a separate one. */
|
|
176
|
-
export type AuthLinkAction = 'link' | 'create_separate';
|
|
177
286
|
/**
|
|
178
|
-
* `
|
|
179
|
-
*
|
|
180
|
-
|
|
287
|
+
* How a `needs_link` collision is resolved: `select` a candidate (multi-account), `link` (step up to / consent
|
|
288
|
+
* into the existing account), or `create_separate` (fork a new one).
|
|
289
|
+
*/
|
|
290
|
+
export type AuthLinkAction = 'link' | 'create_separate' | 'select';
|
|
291
|
+
/**
|
|
292
|
+
* `continue` body — always the `flowId` plus the per-state proof. The endpoint is overloaded by the flow's
|
|
293
|
+
* server-side state, not a body discriminant, so each proof field is optional and only the relevant one is sent.
|
|
181
294
|
*/
|
|
182
295
|
export type AuthContinueBody = {
|
|
183
296
|
flowId: string;
|
|
@@ -187,14 +300,37 @@ export type AuthContinueBody = {
|
|
|
187
300
|
signature?: string;
|
|
188
301
|
cosmosSigner?: string;
|
|
189
302
|
cosmosPublicKeyHex?: string;
|
|
190
|
-
/** Passkey: the WebAuthn assertion
|
|
303
|
+
/** Passkey: the WebAuthn assertion — for a PASSKEY flow, or as a returning account's credential completion
|
|
304
|
+
* of an EMAIL/PHONE flow (signs the challenge the start envelope carried). */
|
|
191
305
|
credentialId?: string;
|
|
192
306
|
clientDataJSON?: string;
|
|
193
307
|
authenticatorData?: string;
|
|
194
|
-
/**
|
|
308
|
+
/**
|
|
309
|
+
* Password/PIN credential completion of an EMAIL/PHONE flow (returning non-enclave account): the
|
|
310
|
+
* RSA-challenge signature over the portal session's web challenge, plus the signing key's stored public key
|
|
311
|
+
* (selects among the ACCOUNT's own password rows server-side — never trusted as an identity). (ENG-7075)
|
|
312
|
+
*/
|
|
313
|
+
credentialSignature?: string;
|
|
314
|
+
credentialPublicKey?: string;
|
|
315
|
+
/** Telegram (WIDGET mechanism): the signed Login Widget payload, HMAC-verified server-side. (ENG-7075) */
|
|
316
|
+
telegramAuthResponse?: TelegramAuthResponse;
|
|
317
|
+
/** Cross-method linking: resolve a `needs_link` collision. `method` is the step-up method being proved — an
|
|
318
|
+
* OTP method (`EMAIL`/`PHONE`) or an OAuth provider. `handle` picks a candidate account in `select` mode. */
|
|
195
319
|
link?: {
|
|
196
320
|
action: AuthLinkAction;
|
|
197
|
-
method?: TOAuthMethod;
|
|
321
|
+
method?: TAuthFlowMethod | TOAuthMethod;
|
|
322
|
+
handle?: string;
|
|
323
|
+
};
|
|
324
|
+
/**
|
|
325
|
+
* Factor-link step-up (`needs_step_up`): which of the session account's own factors is being proved.
|
|
326
|
+
* `method` is an OTP method (`EMAIL`/`PHONE`), `EXTERNAL_WALLET`, or an OAuth provider; `handle` picks the
|
|
327
|
+
* exact factor when the account holds several of that type. Sending it with no proof STARTS the step-up
|
|
328
|
+
* (delivers the code / issues the challenge / returns the redirect); the proof itself then arrives in the
|
|
329
|
+
* matching field (`code`, `signature`) or via the provider callback. (ENG-7075)
|
|
330
|
+
*/
|
|
331
|
+
stepUp?: {
|
|
332
|
+
method: TAuthFlowMethod | TOAuthMethod;
|
|
333
|
+
handle?: string;
|
|
198
334
|
};
|
|
199
335
|
/** OAuth step-up (during linking): where the provider callback returns to. */
|
|
200
336
|
returnUrl?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authState.d.ts","sourceRoot":"","sources":["../../../src/types/authState.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"authState.d.ts","sourceRoot":"","sources":["../../../src/types/authState.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,aAAa,kJAShB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,oEAAqE,CAAC;AAEpG,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,iFAAiF;AACjF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,eAAe,CAAC;IACxB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8FAA8F;IAC9F,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;GAKG;AACH;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB;8GAC0G;IAC1G,OAAO,EAAE,CAAC,eAAe,GA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,CAAC;IACrE,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,yGAAyG;AACzG,MAAM,MAAM,cAAc,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,eAAe,CAAA;CAAE,CAAC"}
|
|
@@ -15,6 +15,8 @@ export declare const LOGIN_TWO_FACTOR_MODES: readonly ["disabled", "optional", "
|
|
|
15
15
|
export type LoginTwoFactorMode = (typeof LOGIN_TWO_FACTOR_MODES)[number];
|
|
16
16
|
export interface IPartnerFeatureFlags {
|
|
17
17
|
authV2?: boolean;
|
|
18
|
+
permissionsV2UserParameters?: boolean;
|
|
19
|
+
permissionsV2ConditionalApprovals?: boolean;
|
|
18
20
|
}
|
|
19
21
|
export interface IPartnerEntity {
|
|
20
22
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partner.d.ts","sourceRoot":"","sources":["../../../src/types/partner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACnG,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EACL,UAAU,EACV,eAAe,EACf,WAAW,EACX,2BAA2B,EAC3B,YAAY,EACZ,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE5B,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,oBAAY,UAAU;IACpB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAUD,eAAO,MAAM,sBAAsB,+CAAgD,CAAC;AACpF,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAM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