@spfn/auth 0.2.1 → 0.3.0-beta.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/LICENSE +1 -1
- package/README.md +1032 -2397
- package/dist/{authenticate-eucncHxN.d.ts → authenticate-DlTGaBT8.d.ts} +545 -82
- package/dist/client-proof.d.ts +606 -0
- package/dist/client-proof.js +1842 -0
- package/dist/client-proof.js.map +1 -0
- package/dist/config.d.ts +319 -3
- package/dist/config.js +155 -5
- package/dist/config.js.map +1 -1
- package/dist/errors.d.ts +180 -3
- package/dist/errors.js +116 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +122 -18
- package/dist/index.js +129 -8
- package/dist/index.js.map +1 -1
- package/dist/nextjs/api.js +404 -96
- package/dist/nextjs/api.js.map +1 -1
- package/dist/nextjs/server.d.ts +5 -4
- package/dist/nextjs/server.js +165 -26
- package/dist/nextjs/server.js.map +1 -1
- package/dist/server.d.ts +2130 -1016
- package/dist/server.js +4916 -739
- package/dist/server.js.map +1 -1
- package/dist/session-DTHahDQ9.d.ts +53 -0
- package/dist/types-DYyhze28.d.ts +98 -0
- package/dist/wire-version-CtzMKvBB.d.ts +134 -0
- package/migrations/20251125021229_premium_famine/snapshot.json +2641 -0
- package/migrations/20260225130050_smooth_the_fury/snapshot.json +2686 -0
- package/migrations/20260308141417_deep_iceman/snapshot.json +2686 -0
- package/migrations/20260308151309_perfect_deathbird/snapshot.json +2731 -0
- package/migrations/20260308201135_concerned_rawhide_kid/snapshot.json +2786 -0
- package/migrations/20260629103209_lethal_lifeguard/migration.sql +32 -0
- package/migrations/20260629103209_lethal_lifeguard/snapshot.json +2786 -0
- package/migrations/20260709073531_easy_hardball/migration.sql +24 -0
- package/migrations/20260709073531_easy_hardball/snapshot.json +3119 -0
- package/migrations/20260714081434_glossy_major_mapleleaf/migration.sql +1 -0
- package/migrations/20260714081434_glossy_major_mapleleaf/snapshot.json +3112 -0
- package/migrations/20260804105939_amazing_bushwacker/migration.sql +3 -0
- package/migrations/20260804105939_amazing_bushwacker/snapshot.json +3112 -0
- package/migrations/20260804110033_fat_piledriver/migration.sql +2 -0
- package/migrations/20260804110033_fat_piledriver/snapshot.json +3138 -0
- package/migrations/20260805143152_vengeful_ravenous/migration.sql +4 -0
- package/migrations/20260805143152_vengeful_ravenous/snapshot.json +3190 -0
- package/package.json +54 -40
- package/migrations/meta/0000_snapshot.json +0 -1632
- package/migrations/meta/0001_snapshot.json +0 -1660
- package/migrations/meta/0002_snapshot.json +0 -1660
- package/migrations/meta/0003_snapshot.json +0 -1689
- package/migrations/meta/0004_snapshot.json +0 -1721
- package/migrations/meta/_journal.json +0 -41
- /package/migrations/{0000_premium_famine.sql → 20251125021229_premium_famine/migration.sql} +0 -0
- /package/migrations/{0001_smooth_the_fury.sql → 20260225130050_smooth_the_fury/migration.sql} +0 -0
- /package/migrations/{0002_deep_iceman.sql → 20260308141417_deep_iceman/migration.sql} +0 -0
- /package/migrations/{0003_perfect_deathbird.sql → 20260308151309_perfect_deathbird/migration.sql} +0 -0
- /package/migrations/{0004_concerned_rawhide_kid.sql → 20260308201135_concerned_rawhide_kid/migration.sql} +0 -0
package/dist/errors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ConflictError, ForbiddenError, NotFoundError, UnauthorizedError, ValidationError, ErrorRegistry } from '@spfn/core/errors';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Authentication & Authorization Error Classes
|
|
@@ -28,6 +28,18 @@ declare class InvalidTokenError extends UnauthorizedError {
|
|
|
28
28
|
details?: Record<string, any>;
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Invalid Social Token Error (401)
|
|
33
|
+
*
|
|
34
|
+
* Thrown when a social provider id_token fails verification
|
|
35
|
+
* (bad signature, wrong issuer/audience, expired, or nonce mismatch).
|
|
36
|
+
*/
|
|
37
|
+
declare class InvalidSocialTokenError extends UnauthorizedError {
|
|
38
|
+
constructor(data?: {
|
|
39
|
+
message?: string;
|
|
40
|
+
details?: Record<string, any>;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
31
43
|
/**
|
|
32
44
|
* Token Expired Error (401)
|
|
33
45
|
*
|
|
@@ -62,6 +74,56 @@ declare class AccountDisabledError extends ForbiddenError {
|
|
|
62
74
|
details?: Record<string, any>;
|
|
63
75
|
});
|
|
64
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Account Pending Deletion Error (403)
|
|
79
|
+
*
|
|
80
|
+
* Thrown on login (password/OAuth/authenticate) when the account is within its
|
|
81
|
+
* deletion grace period. Carries `purgeScheduledAt` so the client can offer a
|
|
82
|
+
* recovery flow instead of a generic "disabled" message.
|
|
83
|
+
*/
|
|
84
|
+
declare class AccountPendingDeletionError extends ForbiddenError {
|
|
85
|
+
constructor(data?: {
|
|
86
|
+
purgeScheduledAt?: string;
|
|
87
|
+
message?: string;
|
|
88
|
+
details?: Record<string, any>;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Deletion Already Requested Error (409)
|
|
93
|
+
*
|
|
94
|
+
* Thrown when requesting deletion for an account that already has a pending
|
|
95
|
+
* deletion request (or has already been purged).
|
|
96
|
+
*/
|
|
97
|
+
declare class DeletionAlreadyRequestedError extends ConflictError {
|
|
98
|
+
constructor(data?: {
|
|
99
|
+
message?: string;
|
|
100
|
+
details?: Record<string, any>;
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Deletion Not Requested Error (404)
|
|
105
|
+
*
|
|
106
|
+
* Thrown when trying to cancel/purge a deletion for an account that has no
|
|
107
|
+
* pending deletion request.
|
|
108
|
+
*/
|
|
109
|
+
declare class DeletionNotRequestedError extends NotFoundError {
|
|
110
|
+
constructor(data?: {
|
|
111
|
+
message?: string;
|
|
112
|
+
details?: Record<string, any>;
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Immediate Deletion Not Allowed Error (403)
|
|
117
|
+
*
|
|
118
|
+
* Thrown when a self-service caller requests `immediate: true` but the server
|
|
119
|
+
* has not enabled `deletion.allowSelfImmediate`.
|
|
120
|
+
*/
|
|
121
|
+
declare class ImmediateDeletionNotAllowedError extends ForbiddenError {
|
|
122
|
+
constructor(data?: {
|
|
123
|
+
message?: string;
|
|
124
|
+
details?: Record<string, any>;
|
|
125
|
+
});
|
|
126
|
+
}
|
|
65
127
|
/**
|
|
66
128
|
* Account Already Exists Error (409)
|
|
67
129
|
*
|
|
@@ -75,6 +137,18 @@ declare class AccountAlreadyExistsError extends ConflictError {
|
|
|
75
137
|
details?: Record<string, any>;
|
|
76
138
|
});
|
|
77
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Registration Rejected Error (403)
|
|
142
|
+
*
|
|
143
|
+
* Thrown by the app-injected beforeRegister hook to reject a registration
|
|
144
|
+
* (age gate, domain restriction, block list, ...)
|
|
145
|
+
*/
|
|
146
|
+
declare class RegistrationRejectedError extends ForbiddenError {
|
|
147
|
+
constructor(data?: {
|
|
148
|
+
message?: string;
|
|
149
|
+
details?: Record<string, any>;
|
|
150
|
+
});
|
|
151
|
+
}
|
|
78
152
|
/**
|
|
79
153
|
* Invalid Verification Code Error (400)
|
|
80
154
|
*
|
|
@@ -97,6 +171,23 @@ declare class InvalidVerificationTokenError extends ValidationError {
|
|
|
97
171
|
details?: Record<string, any>;
|
|
98
172
|
});
|
|
99
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Key ID Already Registered Error (409)
|
|
176
|
+
*
|
|
177
|
+
* Thrown when a sign-in submits a keyId that is already taken — the client's own
|
|
178
|
+
* revoked keyId, or a keyId belonging to another user. `keyId` is unique across
|
|
179
|
+
* all users, so either case would collide on insert.
|
|
180
|
+
*
|
|
181
|
+
* The same error covers both cases on purpose: a distinguishable response would
|
|
182
|
+
* let a caller probe whether an arbitrary keyId exists. Revoked stays revoked —
|
|
183
|
+
* the client must generate a fresh keyId and retry.
|
|
184
|
+
*/
|
|
185
|
+
declare class KeyIdAlreadyRegisteredError extends ConflictError {
|
|
186
|
+
constructor(data?: {
|
|
187
|
+
message?: string;
|
|
188
|
+
details?: Record<string, any>;
|
|
189
|
+
});
|
|
190
|
+
}
|
|
100
191
|
/**
|
|
101
192
|
* Invalid Key Fingerprint Error (400)
|
|
102
193
|
*
|
|
@@ -108,6 +199,70 @@ declare class InvalidKeyFingerprintError extends ValidationError {
|
|
|
108
199
|
details?: Record<string, any>;
|
|
109
200
|
});
|
|
110
201
|
}
|
|
202
|
+
/**
|
|
203
|
+
* Key Not Found Error (404)
|
|
204
|
+
*
|
|
205
|
+
* Thrown when a key operation names a keyId the caller does not own. It says
|
|
206
|
+
* nothing about whether that keyId exists on another account — the repository
|
|
207
|
+
* scopes every lookup by userId, so the answer is only ever "not yours".
|
|
208
|
+
*/
|
|
209
|
+
declare class KeyNotFoundError extends NotFoundError {
|
|
210
|
+
constructor(data?: {
|
|
211
|
+
message?: string;
|
|
212
|
+
details?: Record<string, any>;
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Nonce Key Binding Error (400)
|
|
217
|
+
*
|
|
218
|
+
* Thrown when a native id_token sign-in submits a nonce that is not the public
|
|
219
|
+
* key's fingerprint. The nonce is what the provider echoed back inside the
|
|
220
|
+
* id_token, so tying it to the key is what proves the id_token and the key came
|
|
221
|
+
* from the same device — see the native section of the README.
|
|
222
|
+
*/
|
|
223
|
+
declare class NonceKeyBindingError extends ValidationError {
|
|
224
|
+
constructor(data?: {
|
|
225
|
+
message?: string;
|
|
226
|
+
details?: Record<string, any>;
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Native Sign-In Unsupported Error (400)
|
|
231
|
+
*
|
|
232
|
+
* Thrown when a provider is asked for native id_token sign-in and has no
|
|
233
|
+
* implementation for it — a server configuration fact, not something the user
|
|
234
|
+
* did. A client reading this hides that provider's native button instead of
|
|
235
|
+
* asking the user to try again.
|
|
236
|
+
*
|
|
237
|
+
* Split out of ValidationError because the other native-enrollment refusal
|
|
238
|
+
* (linking to an account whose email the provider never verified) needs a
|
|
239
|
+
* different response from the app, and one code cannot ask for two.
|
|
240
|
+
*/
|
|
241
|
+
declare class NativeSignInUnsupportedError extends ValidationError {
|
|
242
|
+
constructor(data?: {
|
|
243
|
+
message?: string;
|
|
244
|
+
details?: Record<string, any>;
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Unverified Email Link Error (400)
|
|
249
|
+
*
|
|
250
|
+
* Thrown when a social identity carries an email that already belongs to an
|
|
251
|
+
* account, but the provider never verified it. Linking on an unverified email
|
|
252
|
+
* is account takeover, so the refusal stands and the user is sent to a path
|
|
253
|
+
* that proves the address.
|
|
254
|
+
*
|
|
255
|
+
* This says an account exists for that address. It is not a leak introduced
|
|
256
|
+
* here: the message this replaces already stated the same fact in prose, and
|
|
257
|
+
* the paths that must not disclose account existence (password login, deletion
|
|
258
|
+
* re-auth, verification issuance) answer uniformly and are untouched.
|
|
259
|
+
*/
|
|
260
|
+
declare class UnverifiedEmailLinkError extends ValidationError {
|
|
261
|
+
constructor(data?: {
|
|
262
|
+
message?: string;
|
|
263
|
+
details?: Record<string, any>;
|
|
264
|
+
});
|
|
265
|
+
}
|
|
111
266
|
/**
|
|
112
267
|
* Verification Token Purpose Mismatch Error (400)
|
|
113
268
|
*
|
|
@@ -185,6 +340,14 @@ type authErrors_AccountAlreadyExistsError = AccountAlreadyExistsError;
|
|
|
185
340
|
declare const authErrors_AccountAlreadyExistsError: typeof AccountAlreadyExistsError;
|
|
186
341
|
type authErrors_AccountDisabledError = AccountDisabledError;
|
|
187
342
|
declare const authErrors_AccountDisabledError: typeof AccountDisabledError;
|
|
343
|
+
type authErrors_AccountPendingDeletionError = AccountPendingDeletionError;
|
|
344
|
+
declare const authErrors_AccountPendingDeletionError: typeof AccountPendingDeletionError;
|
|
345
|
+
type authErrors_DeletionAlreadyRequestedError = DeletionAlreadyRequestedError;
|
|
346
|
+
declare const authErrors_DeletionAlreadyRequestedError: typeof DeletionAlreadyRequestedError;
|
|
347
|
+
type authErrors_DeletionNotRequestedError = DeletionNotRequestedError;
|
|
348
|
+
declare const authErrors_DeletionNotRequestedError: typeof DeletionNotRequestedError;
|
|
349
|
+
type authErrors_ImmediateDeletionNotAllowedError = ImmediateDeletionNotAllowedError;
|
|
350
|
+
declare const authErrors_ImmediateDeletionNotAllowedError: typeof ImmediateDeletionNotAllowedError;
|
|
188
351
|
type authErrors_InsufficientPermissionsError = InsufficientPermissionsError;
|
|
189
352
|
declare const authErrors_InsufficientPermissionsError: typeof InsufficientPermissionsError;
|
|
190
353
|
type authErrors_InsufficientRoleError = InsufficientRoleError;
|
|
@@ -193,6 +356,8 @@ type authErrors_InvalidCredentialsError = InvalidCredentialsError;
|
|
|
193
356
|
declare const authErrors_InvalidCredentialsError: typeof InvalidCredentialsError;
|
|
194
357
|
type authErrors_InvalidKeyFingerprintError = InvalidKeyFingerprintError;
|
|
195
358
|
declare const authErrors_InvalidKeyFingerprintError: typeof InvalidKeyFingerprintError;
|
|
359
|
+
type authErrors_InvalidSocialTokenError = InvalidSocialTokenError;
|
|
360
|
+
declare const authErrors_InvalidSocialTokenError: typeof InvalidSocialTokenError;
|
|
196
361
|
type authErrors_InvalidTokenError = InvalidTokenError;
|
|
197
362
|
declare const authErrors_InvalidTokenError: typeof InvalidTokenError;
|
|
198
363
|
type authErrors_InvalidVerificationCodeError = InvalidVerificationCodeError;
|
|
@@ -201,10 +366,22 @@ type authErrors_InvalidVerificationTokenError = InvalidVerificationTokenError;
|
|
|
201
366
|
declare const authErrors_InvalidVerificationTokenError: typeof InvalidVerificationTokenError;
|
|
202
367
|
type authErrors_KeyExpiredError = KeyExpiredError;
|
|
203
368
|
declare const authErrors_KeyExpiredError: typeof KeyExpiredError;
|
|
369
|
+
type authErrors_KeyIdAlreadyRegisteredError = KeyIdAlreadyRegisteredError;
|
|
370
|
+
declare const authErrors_KeyIdAlreadyRegisteredError: typeof KeyIdAlreadyRegisteredError;
|
|
371
|
+
type authErrors_KeyNotFoundError = KeyNotFoundError;
|
|
372
|
+
declare const authErrors_KeyNotFoundError: typeof KeyNotFoundError;
|
|
373
|
+
type authErrors_NativeSignInUnsupportedError = NativeSignInUnsupportedError;
|
|
374
|
+
declare const authErrors_NativeSignInUnsupportedError: typeof NativeSignInUnsupportedError;
|
|
375
|
+
type authErrors_NonceKeyBindingError = NonceKeyBindingError;
|
|
376
|
+
declare const authErrors_NonceKeyBindingError: typeof NonceKeyBindingError;
|
|
377
|
+
type authErrors_RegistrationRejectedError = RegistrationRejectedError;
|
|
378
|
+
declare const authErrors_RegistrationRejectedError: typeof RegistrationRejectedError;
|
|
204
379
|
type authErrors_ReservedUsernameError = ReservedUsernameError;
|
|
205
380
|
declare const authErrors_ReservedUsernameError: typeof ReservedUsernameError;
|
|
206
381
|
type authErrors_TokenExpiredError = TokenExpiredError;
|
|
207
382
|
declare const authErrors_TokenExpiredError: typeof TokenExpiredError;
|
|
383
|
+
type authErrors_UnverifiedEmailLinkError = UnverifiedEmailLinkError;
|
|
384
|
+
declare const authErrors_UnverifiedEmailLinkError: typeof UnverifiedEmailLinkError;
|
|
208
385
|
type authErrors_UsernameAlreadyTakenError = UsernameAlreadyTakenError;
|
|
209
386
|
declare const authErrors_UsernameAlreadyTakenError: typeof UsernameAlreadyTakenError;
|
|
210
387
|
type authErrors_VerificationTokenPurposeMismatchError = VerificationTokenPurposeMismatchError;
|
|
@@ -212,7 +389,7 @@ declare const authErrors_VerificationTokenPurposeMismatchError: typeof Verificat
|
|
|
212
389
|
type authErrors_VerificationTokenTargetMismatchError = VerificationTokenTargetMismatchError;
|
|
213
390
|
declare const authErrors_VerificationTokenTargetMismatchError: typeof VerificationTokenTargetMismatchError;
|
|
214
391
|
declare namespace authErrors {
|
|
215
|
-
export { authErrors_AccountAlreadyExistsError as AccountAlreadyExistsError, authErrors_AccountDisabledError as AccountDisabledError, authErrors_InsufficientPermissionsError as InsufficientPermissionsError, authErrors_InsufficientRoleError as InsufficientRoleError, authErrors_InvalidCredentialsError as InvalidCredentialsError, authErrors_InvalidKeyFingerprintError as InvalidKeyFingerprintError, authErrors_InvalidTokenError as InvalidTokenError, authErrors_InvalidVerificationCodeError as InvalidVerificationCodeError, authErrors_InvalidVerificationTokenError as InvalidVerificationTokenError, authErrors_KeyExpiredError as KeyExpiredError, authErrors_ReservedUsernameError as ReservedUsernameError, authErrors_TokenExpiredError as TokenExpiredError, authErrors_UsernameAlreadyTakenError as UsernameAlreadyTakenError, authErrors_VerificationTokenPurposeMismatchError as VerificationTokenPurposeMismatchError, authErrors_VerificationTokenTargetMismatchError as VerificationTokenTargetMismatchError };
|
|
392
|
+
export { authErrors_AccountAlreadyExistsError as AccountAlreadyExistsError, authErrors_AccountDisabledError as AccountDisabledError, authErrors_AccountPendingDeletionError as AccountPendingDeletionError, authErrors_DeletionAlreadyRequestedError as DeletionAlreadyRequestedError, authErrors_DeletionNotRequestedError as DeletionNotRequestedError, authErrors_ImmediateDeletionNotAllowedError as ImmediateDeletionNotAllowedError, authErrors_InsufficientPermissionsError as InsufficientPermissionsError, authErrors_InsufficientRoleError as InsufficientRoleError, authErrors_InvalidCredentialsError as InvalidCredentialsError, authErrors_InvalidKeyFingerprintError as InvalidKeyFingerprintError, authErrors_InvalidSocialTokenError as InvalidSocialTokenError, authErrors_InvalidTokenError as InvalidTokenError, authErrors_InvalidVerificationCodeError as InvalidVerificationCodeError, authErrors_InvalidVerificationTokenError as InvalidVerificationTokenError, authErrors_KeyExpiredError as KeyExpiredError, authErrors_KeyIdAlreadyRegisteredError as KeyIdAlreadyRegisteredError, authErrors_KeyNotFoundError as KeyNotFoundError, authErrors_NativeSignInUnsupportedError as NativeSignInUnsupportedError, authErrors_NonceKeyBindingError as NonceKeyBindingError, authErrors_RegistrationRejectedError as RegistrationRejectedError, authErrors_ReservedUsernameError as ReservedUsernameError, authErrors_TokenExpiredError as TokenExpiredError, authErrors_UnverifiedEmailLinkError as UnverifiedEmailLinkError, authErrors_UsernameAlreadyTakenError as UsernameAlreadyTakenError, authErrors_VerificationTokenPurposeMismatchError as VerificationTokenPurposeMismatchError, authErrors_VerificationTokenTargetMismatchError as VerificationTokenTargetMismatchError };
|
|
216
393
|
}
|
|
217
394
|
|
|
218
395
|
/**
|
|
@@ -221,4 +398,4 @@ declare namespace authErrors {
|
|
|
221
398
|
|
|
222
399
|
declare const authErrorRegistry: ErrorRegistry;
|
|
223
400
|
|
|
224
|
-
export { AccountAlreadyExistsError, AccountDisabledError, authErrors as AuthError, InsufficientPermissionsError, InsufficientRoleError, InvalidCredentialsError, InvalidKeyFingerprintError, InvalidTokenError, InvalidVerificationCodeError, InvalidVerificationTokenError, KeyExpiredError, ReservedUsernameError, TokenExpiredError, UsernameAlreadyTakenError, VerificationTokenPurposeMismatchError, VerificationTokenTargetMismatchError, authErrorRegistry };
|
|
401
|
+
export { AccountAlreadyExistsError, AccountDisabledError, AccountPendingDeletionError, authErrors as AuthError, DeletionAlreadyRequestedError, DeletionNotRequestedError, ImmediateDeletionNotAllowedError, InsufficientPermissionsError, InsufficientRoleError, InvalidCredentialsError, InvalidKeyFingerprintError, InvalidSocialTokenError, InvalidTokenError, InvalidVerificationCodeError, InvalidVerificationTokenError, KeyExpiredError, KeyIdAlreadyRegisteredError, KeyNotFoundError, NativeSignInUnsupportedError, NonceKeyBindingError, RegistrationRejectedError, ReservedUsernameError, TokenExpiredError, UnverifiedEmailLinkError, UsernameAlreadyTakenError, VerificationTokenPurposeMismatchError, VerificationTokenTargetMismatchError, authErrorRegistry };
|
package/dist/errors.js
CHANGED
|
@@ -12,16 +12,27 @@ var auth_errors_exports = {};
|
|
|
12
12
|
__export(auth_errors_exports, {
|
|
13
13
|
AccountAlreadyExistsError: () => AccountAlreadyExistsError,
|
|
14
14
|
AccountDisabledError: () => AccountDisabledError,
|
|
15
|
+
AccountPendingDeletionError: () => AccountPendingDeletionError,
|
|
16
|
+
DeletionAlreadyRequestedError: () => DeletionAlreadyRequestedError,
|
|
17
|
+
DeletionNotRequestedError: () => DeletionNotRequestedError,
|
|
18
|
+
ImmediateDeletionNotAllowedError: () => ImmediateDeletionNotAllowedError,
|
|
15
19
|
InsufficientPermissionsError: () => InsufficientPermissionsError,
|
|
16
20
|
InsufficientRoleError: () => InsufficientRoleError,
|
|
17
21
|
InvalidCredentialsError: () => InvalidCredentialsError,
|
|
18
22
|
InvalidKeyFingerprintError: () => InvalidKeyFingerprintError,
|
|
23
|
+
InvalidSocialTokenError: () => InvalidSocialTokenError,
|
|
19
24
|
InvalidTokenError: () => InvalidTokenError,
|
|
20
25
|
InvalidVerificationCodeError: () => InvalidVerificationCodeError,
|
|
21
26
|
InvalidVerificationTokenError: () => InvalidVerificationTokenError,
|
|
22
27
|
KeyExpiredError: () => KeyExpiredError,
|
|
28
|
+
KeyIdAlreadyRegisteredError: () => KeyIdAlreadyRegisteredError,
|
|
29
|
+
KeyNotFoundError: () => KeyNotFoundError,
|
|
30
|
+
NativeSignInUnsupportedError: () => NativeSignInUnsupportedError,
|
|
31
|
+
NonceKeyBindingError: () => NonceKeyBindingError,
|
|
32
|
+
RegistrationRejectedError: () => RegistrationRejectedError,
|
|
23
33
|
ReservedUsernameError: () => ReservedUsernameError,
|
|
24
34
|
TokenExpiredError: () => TokenExpiredError,
|
|
35
|
+
UnverifiedEmailLinkError: () => UnverifiedEmailLinkError,
|
|
25
36
|
UsernameAlreadyTakenError: () => UsernameAlreadyTakenError,
|
|
26
37
|
VerificationTokenPurposeMismatchError: () => VerificationTokenPurposeMismatchError,
|
|
27
38
|
VerificationTokenTargetMismatchError: () => VerificationTokenTargetMismatchError
|
|
@@ -30,7 +41,8 @@ import {
|
|
|
30
41
|
ValidationError,
|
|
31
42
|
UnauthorizedError,
|
|
32
43
|
ForbiddenError,
|
|
33
|
-
ConflictError
|
|
44
|
+
ConflictError,
|
|
45
|
+
NotFoundError
|
|
34
46
|
} from "@spfn/core/errors";
|
|
35
47
|
var InvalidCredentialsError = class extends UnauthorizedError {
|
|
36
48
|
constructor(data = {}) {
|
|
@@ -44,6 +56,12 @@ var InvalidTokenError = class extends UnauthorizedError {
|
|
|
44
56
|
this.name = "InvalidTokenError";
|
|
45
57
|
}
|
|
46
58
|
};
|
|
59
|
+
var InvalidSocialTokenError = class extends UnauthorizedError {
|
|
60
|
+
constructor(data = {}) {
|
|
61
|
+
super({ message: data.message || "Invalid social id_token", details: data.details });
|
|
62
|
+
this.name = "InvalidSocialTokenError";
|
|
63
|
+
}
|
|
64
|
+
};
|
|
47
65
|
var TokenExpiredError = class extends UnauthorizedError {
|
|
48
66
|
constructor(data = {}) {
|
|
49
67
|
super({ message: data.message || "Authentication token has expired", details: data.details });
|
|
@@ -66,6 +84,33 @@ var AccountDisabledError = class extends ForbiddenError {
|
|
|
66
84
|
this.name = "AccountDisabledError";
|
|
67
85
|
}
|
|
68
86
|
};
|
|
87
|
+
var AccountPendingDeletionError = class extends ForbiddenError {
|
|
88
|
+
constructor(data = {}) {
|
|
89
|
+
super({
|
|
90
|
+
message: data.message || "Account is scheduled for deletion",
|
|
91
|
+
details: { status: "pending_deletion", purgeScheduledAt: data.purgeScheduledAt, ...data.details }
|
|
92
|
+
});
|
|
93
|
+
this.name = "AccountPendingDeletionError";
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
var DeletionAlreadyRequestedError = class extends ConflictError {
|
|
97
|
+
constructor(data = {}) {
|
|
98
|
+
super({ message: data.message || "Account deletion has already been requested", details: data.details });
|
|
99
|
+
this.name = "DeletionAlreadyRequestedError";
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
var DeletionNotRequestedError = class extends NotFoundError {
|
|
103
|
+
constructor(data = {}) {
|
|
104
|
+
super({ message: data.message || "No pending account deletion request found", details: data.details });
|
|
105
|
+
this.name = "DeletionNotRequestedError";
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
var ImmediateDeletionNotAllowedError = class extends ForbiddenError {
|
|
109
|
+
constructor(data = {}) {
|
|
110
|
+
super({ message: data.message || "Immediate self-service deletion is not enabled", details: data.details });
|
|
111
|
+
this.name = "ImmediateDeletionNotAllowedError";
|
|
112
|
+
}
|
|
113
|
+
};
|
|
69
114
|
var AccountAlreadyExistsError = class extends ConflictError {
|
|
70
115
|
constructor(data = {}) {
|
|
71
116
|
super({
|
|
@@ -79,6 +124,12 @@ var AccountAlreadyExistsError = class extends ConflictError {
|
|
|
79
124
|
this.name = "AccountAlreadyExistsError";
|
|
80
125
|
}
|
|
81
126
|
};
|
|
127
|
+
var RegistrationRejectedError = class extends ForbiddenError {
|
|
128
|
+
constructor(data = {}) {
|
|
129
|
+
super({ message: data.message || "Registration rejected", details: data.details });
|
|
130
|
+
this.name = "RegistrationRejectedError";
|
|
131
|
+
}
|
|
132
|
+
};
|
|
82
133
|
var InvalidVerificationCodeError = class extends ValidationError {
|
|
83
134
|
constructor(data = {}) {
|
|
84
135
|
super({ message: data.message || "Invalid verification code", details: data.details });
|
|
@@ -91,12 +142,54 @@ var InvalidVerificationTokenError = class extends ValidationError {
|
|
|
91
142
|
this.name = "InvalidVerificationTokenError";
|
|
92
143
|
}
|
|
93
144
|
};
|
|
145
|
+
var KeyIdAlreadyRegisteredError = class extends ConflictError {
|
|
146
|
+
constructor(data = {}) {
|
|
147
|
+
super({
|
|
148
|
+
message: data.message || "This keyId is already registered. Generate a new keyId and retry.",
|
|
149
|
+
details: data.details
|
|
150
|
+
});
|
|
151
|
+
this.name = "KeyIdAlreadyRegisteredError";
|
|
152
|
+
}
|
|
153
|
+
};
|
|
94
154
|
var InvalidKeyFingerprintError = class extends ValidationError {
|
|
95
155
|
constructor(data = {}) {
|
|
96
156
|
super({ message: data.message || "Invalid key fingerprint", details: data.details });
|
|
97
157
|
this.name = "InvalidKeyFingerprintError";
|
|
98
158
|
}
|
|
99
159
|
};
|
|
160
|
+
var KeyNotFoundError = class extends NotFoundError {
|
|
161
|
+
constructor(data = {}) {
|
|
162
|
+
super({ message: data.message || "Key not found", details: data.details });
|
|
163
|
+
this.name = "KeyNotFoundError";
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
var NonceKeyBindingError = class extends ValidationError {
|
|
167
|
+
constructor(data = {}) {
|
|
168
|
+
super({
|
|
169
|
+
message: data.message || "nonce must be the fingerprint of the submitted public key",
|
|
170
|
+
details: data.details
|
|
171
|
+
});
|
|
172
|
+
this.name = "NonceKeyBindingError";
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
var NativeSignInUnsupportedError = class extends ValidationError {
|
|
176
|
+
constructor(data = {}) {
|
|
177
|
+
super({
|
|
178
|
+
message: data.message || "This provider does not support native id_token sign-in.",
|
|
179
|
+
details: data.details
|
|
180
|
+
});
|
|
181
|
+
this.name = "NativeSignInUnsupportedError";
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
var UnverifiedEmailLinkError = class extends ValidationError {
|
|
185
|
+
constructor(data = {}) {
|
|
186
|
+
super({
|
|
187
|
+
message: data.message || "Cannot link to existing account with unverified email. Please verify your email with the provider first.",
|
|
188
|
+
details: data.details
|
|
189
|
+
});
|
|
190
|
+
this.name = "UnverifiedEmailLinkError";
|
|
191
|
+
}
|
|
192
|
+
};
|
|
100
193
|
var VerificationTokenPurposeMismatchError = class extends ValidationError {
|
|
101
194
|
constructor(data = {}) {
|
|
102
195
|
const expected = data.expected || "unknown";
|
|
@@ -161,15 +254,26 @@ var authErrorRegistry = new ErrorRegistry();
|
|
|
161
254
|
authErrorRegistry.append([
|
|
162
255
|
InvalidCredentialsError,
|
|
163
256
|
InvalidTokenError,
|
|
257
|
+
InvalidSocialTokenError,
|
|
164
258
|
TokenExpiredError,
|
|
165
259
|
KeyExpiredError,
|
|
166
260
|
AccountDisabledError,
|
|
261
|
+
AccountPendingDeletionError,
|
|
262
|
+
DeletionAlreadyRequestedError,
|
|
263
|
+
DeletionNotRequestedError,
|
|
264
|
+
ImmediateDeletionNotAllowedError,
|
|
167
265
|
AccountAlreadyExistsError,
|
|
266
|
+
RegistrationRejectedError,
|
|
168
267
|
ReservedUsernameError,
|
|
169
268
|
UsernameAlreadyTakenError,
|
|
170
269
|
InvalidVerificationCodeError,
|
|
171
270
|
InvalidVerificationTokenError,
|
|
172
271
|
InvalidKeyFingerprintError,
|
|
272
|
+
NonceKeyBindingError,
|
|
273
|
+
NativeSignInUnsupportedError,
|
|
274
|
+
UnverifiedEmailLinkError,
|
|
275
|
+
KeyNotFoundError,
|
|
276
|
+
KeyIdAlreadyRegisteredError,
|
|
173
277
|
VerificationTokenPurposeMismatchError,
|
|
174
278
|
VerificationTokenTargetMismatchError,
|
|
175
279
|
InsufficientPermissionsError,
|
|
@@ -178,17 +282,28 @@ authErrorRegistry.append([
|
|
|
178
282
|
export {
|
|
179
283
|
AccountAlreadyExistsError,
|
|
180
284
|
AccountDisabledError,
|
|
285
|
+
AccountPendingDeletionError,
|
|
181
286
|
auth_errors_exports as AuthError,
|
|
287
|
+
DeletionAlreadyRequestedError,
|
|
288
|
+
DeletionNotRequestedError,
|
|
289
|
+
ImmediateDeletionNotAllowedError,
|
|
182
290
|
InsufficientPermissionsError,
|
|
183
291
|
InsufficientRoleError,
|
|
184
292
|
InvalidCredentialsError,
|
|
185
293
|
InvalidKeyFingerprintError,
|
|
294
|
+
InvalidSocialTokenError,
|
|
186
295
|
InvalidTokenError,
|
|
187
296
|
InvalidVerificationCodeError,
|
|
188
297
|
InvalidVerificationTokenError,
|
|
189
298
|
KeyExpiredError,
|
|
299
|
+
KeyIdAlreadyRegisteredError,
|
|
300
|
+
KeyNotFoundError,
|
|
301
|
+
NativeSignInUnsupportedError,
|
|
302
|
+
NonceKeyBindingError,
|
|
303
|
+
RegistrationRejectedError,
|
|
190
304
|
ReservedUsernameError,
|
|
191
305
|
TokenExpiredError,
|
|
306
|
+
UnverifiedEmailLinkError,
|
|
192
307
|
UsernameAlreadyTakenError,
|
|
193
308
|
VerificationTokenPurposeMismatchError,
|
|
194
309
|
VerificationTokenTargetMismatchError,
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/errors/index.ts","../src/errors/auth-errors.ts"],"sourcesContent":["/**\n * Auth Error Exports\n */\n\nimport { ErrorRegistry } from \"@spfn/core/errors\";\n\nimport {\n InvalidCredentialsError,\n InvalidTokenError,\n TokenExpiredError,\n KeyExpiredError,\n AccountDisabledError,\n AccountAlreadyExistsError,\n ReservedUsernameError,\n UsernameAlreadyTakenError,\n InvalidVerificationCodeError,\n InvalidVerificationTokenError,\n InvalidKeyFingerprintError,\n VerificationTokenPurposeMismatchError,\n VerificationTokenTargetMismatchError,\n InsufficientPermissionsError,\n InsufficientRoleError,\n} from './auth-errors';\n\nexport {\n InvalidCredentialsError,\n InvalidTokenError,\n TokenExpiredError,\n KeyExpiredError,\n AccountDisabledError,\n AccountAlreadyExistsError,\n ReservedUsernameError,\n UsernameAlreadyTakenError,\n InvalidVerificationCodeError,\n InvalidVerificationTokenError,\n InvalidKeyFingerprintError,\n VerificationTokenPurposeMismatchError,\n VerificationTokenTargetMismatchError,\n InsufficientPermissionsError,\n InsufficientRoleError,\n} from './auth-errors';\n\nexport const authErrorRegistry = new ErrorRegistry();\nauthErrorRegistry.append([\n InvalidCredentialsError,\n InvalidTokenError,\n TokenExpiredError,\n KeyExpiredError,\n AccountDisabledError,\n AccountAlreadyExistsError,\n ReservedUsernameError,\n UsernameAlreadyTakenError,\n InvalidVerificationCodeError,\n InvalidVerificationTokenError,\n InvalidKeyFingerprintError,\n VerificationTokenPurposeMismatchError,\n VerificationTokenTargetMismatchError,\n InsufficientPermissionsError,\n InsufficientRoleError,\n]);\n\nexport * as AuthError from './auth-errors';","/**\n * Authentication & Authorization Error Classes\n *\n * Custom error classes for auth-specific scenarios\n */\n\nimport {\n ValidationError,\n UnauthorizedError,\n ForbiddenError,\n ConflictError\n} from '@spfn/core/errors';\n\n/**\n * Invalid Credentials Error (401)\n *\n * Thrown when login credentials are incorrect\n */\nexport class InvalidCredentialsError extends UnauthorizedError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Invalid credentials', details: data.details });\n this.name = 'InvalidCredentialsError';\n }\n}\n\n/**\n * Invalid Token Error (401)\n *\n * Thrown when authentication token is invalid or malformed\n */\nexport class InvalidTokenError extends UnauthorizedError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Invalid authentication token', details: data.details });\n this.name = 'InvalidTokenError';\n }\n}\n\n/**\n * Token Expired Error (401)\n *\n * Thrown when authentication token has expired\n */\nexport class TokenExpiredError extends UnauthorizedError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Authentication token has expired', details: data.details });\n this.name = 'TokenExpiredError';\n }\n}\n\n/**\n * Key Expired Error (401)\n *\n * Thrown when public key has expired\n */\nexport class KeyExpiredError extends UnauthorizedError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Public key has expired', details: data.details });\n this.name = 'KeyExpiredError';\n }\n}\n\n/**\n * Account Disabled Error (403)\n *\n * Thrown when user account is disabled or inactive\n */\nexport class AccountDisabledError extends ForbiddenError\n{\n constructor(data: { status?: string; message?: string; details?: Record<string, any> } = {})\n {\n const status = data.status || 'disabled';\n super({\n message: data.message || `Account is ${status}`,\n details: { status, ...data.details }\n });\n this.name = 'AccountDisabledError';\n }\n}\n\n/**\n * Account Already Exists Error (409)\n *\n * Thrown when trying to register with existing email/phone\n */\nexport class AccountAlreadyExistsError extends ConflictError\n{\n constructor(data: { identifier?: string; identifierType?: 'email' | 'phone'; message?: string; details?: Record<string, any> } = {})\n {\n super({\n message: data.message || 'Account already exists',\n details: {\n identifier: data.identifier,\n identifierType: data.identifierType,\n ...data.details\n }\n });\n this.name = 'AccountAlreadyExistsError';\n }\n}\n\n/**\n * Invalid Verification Code Error (400)\n *\n * Thrown when verification code is invalid, expired, or already used\n */\nexport class InvalidVerificationCodeError extends ValidationError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Invalid verification code', details: data.details });\n this.name = 'InvalidVerificationCodeError';\n }\n}\n\n/**\n * Invalid Verification Token Error (400)\n *\n * Thrown when verification token is invalid or expired\n */\nexport class InvalidVerificationTokenError extends ValidationError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Invalid or expired verification token', details: data.details });\n this.name = 'InvalidVerificationTokenError';\n }\n}\n\n/**\n * Invalid Key Fingerprint Error (400)\n *\n * Thrown when public key fingerprint doesn't match the public key\n */\nexport class InvalidKeyFingerprintError extends ValidationError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Invalid key fingerprint', details: data.details });\n this.name = 'InvalidKeyFingerprintError';\n }\n}\n\n/**\n * Verification Token Purpose Mismatch Error (400)\n *\n * Thrown when verification token purpose doesn't match expected purpose\n */\nexport class VerificationTokenPurposeMismatchError extends ValidationError\n{\n constructor(data: { expected?: string; actual?: string; message?: string; details?: Record<string, any> } = {})\n {\n const expected = data.expected || 'unknown';\n const actual = data.actual || 'unknown';\n super({\n message: data.message || `Verification token is for ${actual}, but ${expected} was expected`,\n details: { expected, actual, ...data.details }\n });\n this.name = 'VerificationTokenPurposeMismatchError';\n }\n}\n\n/**\n * Verification Token Target Mismatch Error (400)\n *\n * Thrown when verification token target doesn't match provided email/phone\n */\nexport class VerificationTokenTargetMismatchError extends ValidationError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({\n message: data.message || 'Verification token does not match provided email/phone',\n details: data.details\n });\n this.name = 'VerificationTokenTargetMismatchError';\n }\n}\n\n/**\n * Reserved Username Error (400)\n *\n * Thrown when trying to use a reserved/prohibited username\n */\nexport class ReservedUsernameError extends ValidationError\n{\n constructor(data: { username?: string; message?: string; details?: Record<string, any> } = {})\n {\n super({\n message: data.message || 'This username is reserved',\n details: { username: data.username, ...data.details }\n });\n this.name = 'ReservedUsernameError';\n }\n}\n\n/**\n * Username Already Taken Error (409)\n *\n * Thrown when trying to set a username that is already in use\n */\nexport class UsernameAlreadyTakenError extends ConflictError\n{\n constructor(data: { username?: string; message?: string; details?: Record<string, any> } = {})\n {\n super({\n message: data.message || 'Username is already taken',\n details: { username: data.username, ...data.details }\n });\n this.name = 'UsernameAlreadyTakenError';\n }\n}\n\n/**\n * Insufficient Permissions Error (403)\n *\n * Thrown when user lacks required permissions for the operation\n */\nexport class InsufficientPermissionsError extends ForbiddenError\n{\n constructor(data: { requiredPermissions?: string[]; message?: string; details?: Record<string, any> } = {})\n {\n const requiredPermissions = data.requiredPermissions || [];\n super({\n message: data.message || `Missing required permissions: ${requiredPermissions.join(', ')}`,\n details: { requiredPermissions, ...data.details }\n });\n this.name = 'InsufficientPermissionsError';\n }\n}\n\n/**\n * Insufficient Role Error (403)\n *\n * Thrown when user lacks required role for the operation\n */\nexport class InsufficientRoleError extends ForbiddenError\n{\n constructor(data: { requiredRoles?: string[]; message?: string; details?: Record<string, any> } = {})\n {\n const requiredRoles = data.requiredRoles || [];\n super({\n message: data.message || `Required roles: ${requiredRoles.join(', ')}`,\n details: { requiredRoles, ...data.details }\n });\n this.name = 'InsufficientRoleError';\n }\n}"],"mappings":";;;;;;;AAIA,SAAS,qBAAqB;;;ACJ9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AAOA,IAAM,0BAAN,cAAsC,kBAC7C;AAAA,EACI,YAAY,OAA4D,CAAC,GACzE;AACI,UAAM,EAAE,SAAS,KAAK,WAAW,uBAAuB,SAAS,KAAK,QAAQ,CAAC;AAC/E,SAAK,OAAO;AAAA,EAChB;AACJ;AAOO,IAAM,oBAAN,cAAgC,kBACvC;AA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AAO;AAAA,EAChB;AACJ;AAOO,IAAM,+BAAN,cAA2C,eAClD;AAAA,EACI,YAAY,OAA4F,CAAC,GACzG;AACI,UAAM,sBAAsB,KAAK,uBAAuB,CAAC;AACzD,UAAM;AAAA,MACF,SAAS,KAAK,WAAW,iCAAiC,oBAAoB,KAAK,IAAI,CAAC;AAAA,MACxF,SAAS,EAAE,qBAAqB,GAAG,KAAK,QAAQ;AAAA,IACpD,CAAC;AACD,SAAK,OAAO;AAAA,EAChB;AACJ;AAOO,IAAM,wBAAN,cAAoC,eAC3C;AAAA,EACI,YAAY,OAAsF,CAAC,GACnG;AACI,UAAM,gBAAgB,KAAK,iBAAiB,CAAC;AAC7C,UAAM;AAAA,MACF,SAAS,KAAK,WAAW,mBAAmB,cAAc,KAAK,IAAI,CAAC;AAAA,MACpE,SAAS,EAAE,eAAe,GAAG,KAAK,QAAQ;AAAA,IAC9C,CAAC;AACD,SAAK,OAAO;AAAA,EAChB;AACJ;;;ADpNO,IAAM,oBAAoB,IAAI,cAAc;AACnD,kBAAkB,OAAO;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/errors/index.ts","../src/errors/auth-errors.ts"],"sourcesContent":["/**\n * Auth Error Exports\n */\n\nimport { ErrorRegistry } from '@spfn/core/errors';\n\nimport {\n InvalidCredentialsError,\n InvalidTokenError,\n InvalidSocialTokenError,\n TokenExpiredError,\n KeyExpiredError,\n AccountDisabledError,\n AccountPendingDeletionError,\n DeletionAlreadyRequestedError,\n DeletionNotRequestedError,\n ImmediateDeletionNotAllowedError,\n AccountAlreadyExistsError,\n RegistrationRejectedError,\n ReservedUsernameError,\n UsernameAlreadyTakenError,\n InvalidVerificationCodeError,\n InvalidVerificationTokenError,\n InvalidKeyFingerprintError,\n NonceKeyBindingError,\n NativeSignInUnsupportedError,\n UnverifiedEmailLinkError,\n KeyNotFoundError,\n KeyIdAlreadyRegisteredError,\n VerificationTokenPurposeMismatchError,\n VerificationTokenTargetMismatchError,\n InsufficientPermissionsError,\n InsufficientRoleError,\n} from './auth-errors';\n\nexport {\n InvalidCredentialsError,\n InvalidTokenError,\n InvalidSocialTokenError,\n TokenExpiredError,\n KeyExpiredError,\n AccountDisabledError,\n AccountPendingDeletionError,\n DeletionAlreadyRequestedError,\n DeletionNotRequestedError,\n ImmediateDeletionNotAllowedError,\n AccountAlreadyExistsError,\n RegistrationRejectedError,\n ReservedUsernameError,\n UsernameAlreadyTakenError,\n InvalidVerificationCodeError,\n InvalidVerificationTokenError,\n InvalidKeyFingerprintError,\n NonceKeyBindingError,\n NativeSignInUnsupportedError,\n UnverifiedEmailLinkError,\n KeyNotFoundError,\n KeyIdAlreadyRegisteredError,\n VerificationTokenPurposeMismatchError,\n VerificationTokenTargetMismatchError,\n InsufficientPermissionsError,\n InsufficientRoleError,\n} from './auth-errors';\n\nexport const authErrorRegistry = new ErrorRegistry();\nauthErrorRegistry.append([\n InvalidCredentialsError,\n InvalidTokenError,\n InvalidSocialTokenError,\n TokenExpiredError,\n KeyExpiredError,\n AccountDisabledError,\n AccountPendingDeletionError,\n DeletionAlreadyRequestedError,\n DeletionNotRequestedError,\n ImmediateDeletionNotAllowedError,\n AccountAlreadyExistsError,\n RegistrationRejectedError,\n ReservedUsernameError,\n UsernameAlreadyTakenError,\n InvalidVerificationCodeError,\n InvalidVerificationTokenError,\n InvalidKeyFingerprintError,\n NonceKeyBindingError,\n NativeSignInUnsupportedError,\n UnverifiedEmailLinkError,\n KeyNotFoundError,\n KeyIdAlreadyRegisteredError,\n VerificationTokenPurposeMismatchError,\n VerificationTokenTargetMismatchError,\n InsufficientPermissionsError,\n InsufficientRoleError,\n]);\n\nexport * as AuthError from './auth-errors';\n","/**\n * Authentication & Authorization Error Classes\n *\n * Custom error classes for auth-specific scenarios\n */\n\nimport {\n ValidationError,\n UnauthorizedError,\n ForbiddenError,\n ConflictError,\n NotFoundError,\n} from '@spfn/core/errors';\n\n/**\n * Invalid Credentials Error (401)\n *\n * Thrown when login credentials are incorrect\n */\nexport class InvalidCredentialsError extends UnauthorizedError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Invalid credentials', details: data.details });\n this.name = 'InvalidCredentialsError';\n }\n}\n\n/**\n * Invalid Token Error (401)\n *\n * Thrown when authentication token is invalid or malformed\n */\nexport class InvalidTokenError extends UnauthorizedError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Invalid authentication token', details: data.details });\n this.name = 'InvalidTokenError';\n }\n}\n\n/**\n * Invalid Social Token Error (401)\n *\n * Thrown when a social provider id_token fails verification\n * (bad signature, wrong issuer/audience, expired, or nonce mismatch).\n */\nexport class InvalidSocialTokenError extends UnauthorizedError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Invalid social id_token', details: data.details });\n this.name = 'InvalidSocialTokenError';\n }\n}\n\n/**\n * Token Expired Error (401)\n *\n * Thrown when authentication token has expired\n */\nexport class TokenExpiredError extends UnauthorizedError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Authentication token has expired', details: data.details });\n this.name = 'TokenExpiredError';\n }\n}\n\n/**\n * Key Expired Error (401)\n *\n * Thrown when public key has expired\n */\nexport class KeyExpiredError extends UnauthorizedError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Public key has expired', details: data.details });\n this.name = 'KeyExpiredError';\n }\n}\n\n/**\n * Account Disabled Error (403)\n *\n * Thrown when user account is disabled or inactive\n */\nexport class AccountDisabledError extends ForbiddenError\n{\n constructor(data: { status?: string; message?: string; details?: Record<string, any> } = {})\n {\n const status = data.status || 'disabled';\n super({\n message: data.message || `Account is ${status}`,\n details: { status, ...data.details },\n });\n this.name = 'AccountDisabledError';\n }\n}\n\n/**\n * Account Pending Deletion Error (403)\n *\n * Thrown on login (password/OAuth/authenticate) when the account is within its\n * deletion grace period. Carries `purgeScheduledAt` so the client can offer a\n * recovery flow instead of a generic \"disabled\" message.\n */\nexport class AccountPendingDeletionError extends ForbiddenError\n{\n constructor(data: { purgeScheduledAt?: string; message?: string; details?: Record<string, any> } = {})\n {\n super({\n message: data.message || 'Account is scheduled for deletion',\n details: { status: 'pending_deletion', purgeScheduledAt: data.purgeScheduledAt, ...data.details },\n });\n this.name = 'AccountPendingDeletionError';\n }\n}\n\n/**\n * Deletion Already Requested Error (409)\n *\n * Thrown when requesting deletion for an account that already has a pending\n * deletion request (or has already been purged).\n */\nexport class DeletionAlreadyRequestedError extends ConflictError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Account deletion has already been requested', details: data.details });\n this.name = 'DeletionAlreadyRequestedError';\n }\n}\n\n/**\n * Deletion Not Requested Error (404)\n *\n * Thrown when trying to cancel/purge a deletion for an account that has no\n * pending deletion request.\n */\nexport class DeletionNotRequestedError extends NotFoundError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'No pending account deletion request found', details: data.details });\n this.name = 'DeletionNotRequestedError';\n }\n}\n\n/**\n * Immediate Deletion Not Allowed Error (403)\n *\n * Thrown when a self-service caller requests `immediate: true` but the server\n * has not enabled `deletion.allowSelfImmediate`.\n */\nexport class ImmediateDeletionNotAllowedError extends ForbiddenError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Immediate self-service deletion is not enabled', details: data.details });\n this.name = 'ImmediateDeletionNotAllowedError';\n }\n}\n\n/**\n * Account Already Exists Error (409)\n *\n * Thrown when trying to register with existing email/phone\n */\nexport class AccountAlreadyExistsError extends ConflictError\n{\n constructor(data: { identifier?: string; identifierType?: 'email' | 'phone'; message?: string; details?: Record<string, any> } = {})\n {\n super({\n message: data.message || 'Account already exists',\n details: {\n identifier: data.identifier,\n identifierType: data.identifierType,\n ...data.details,\n },\n });\n this.name = 'AccountAlreadyExistsError';\n }\n}\n\n/**\n * Registration Rejected Error (403)\n *\n * Thrown by the app-injected beforeRegister hook to reject a registration\n * (age gate, domain restriction, block list, ...)\n */\nexport class RegistrationRejectedError extends ForbiddenError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Registration rejected', details: data.details });\n this.name = 'RegistrationRejectedError';\n }\n}\n\n/**\n * Invalid Verification Code Error (400)\n *\n * Thrown when verification code is invalid, expired, or already used\n */\nexport class InvalidVerificationCodeError extends ValidationError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Invalid verification code', details: data.details });\n this.name = 'InvalidVerificationCodeError';\n }\n}\n\n/**\n * Invalid Verification Token Error (400)\n *\n * Thrown when verification token is invalid or expired\n */\nexport class InvalidVerificationTokenError extends ValidationError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Invalid or expired verification token', details: data.details });\n this.name = 'InvalidVerificationTokenError';\n }\n}\n\n/**\n * Key ID Already Registered Error (409)\n *\n * Thrown when a sign-in submits a keyId that is already taken — the client's own\n * revoked keyId, or a keyId belonging to another user. `keyId` is unique across\n * all users, so either case would collide on insert.\n *\n * The same error covers both cases on purpose: a distinguishable response would\n * let a caller probe whether an arbitrary keyId exists. Revoked stays revoked —\n * the client must generate a fresh keyId and retry.\n */\nexport class KeyIdAlreadyRegisteredError extends ConflictError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({\n message: data.message || 'This keyId is already registered. Generate a new keyId and retry.',\n details: data.details,\n });\n this.name = 'KeyIdAlreadyRegisteredError';\n }\n}\n\n/**\n * Invalid Key Fingerprint Error (400)\n *\n * Thrown when public key fingerprint doesn't match the public key\n */\nexport class InvalidKeyFingerprintError extends ValidationError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Invalid key fingerprint', details: data.details });\n this.name = 'InvalidKeyFingerprintError';\n }\n}\n\n/**\n * Key Not Found Error (404)\n *\n * Thrown when a key operation names a keyId the caller does not own. It says\n * nothing about whether that keyId exists on another account — the repository\n * scopes every lookup by userId, so the answer is only ever \"not yours\".\n */\nexport class KeyNotFoundError extends NotFoundError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({ message: data.message || 'Key not found', details: data.details });\n this.name = 'KeyNotFoundError';\n }\n}\n\n/**\n * Nonce Key Binding Error (400)\n *\n * Thrown when a native id_token sign-in submits a nonce that is not the public\n * key's fingerprint. The nonce is what the provider echoed back inside the\n * id_token, so tying it to the key is what proves the id_token and the key came\n * from the same device — see the native section of the README.\n */\nexport class NonceKeyBindingError extends ValidationError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({\n message: data.message || 'nonce must be the fingerprint of the submitted public key',\n details: data.details,\n });\n this.name = 'NonceKeyBindingError';\n }\n}\n\n/**\n * Native Sign-In Unsupported Error (400)\n *\n * Thrown when a provider is asked for native id_token sign-in and has no\n * implementation for it — a server configuration fact, not something the user\n * did. A client reading this hides that provider's native button instead of\n * asking the user to try again.\n *\n * Split out of ValidationError because the other native-enrollment refusal\n * (linking to an account whose email the provider never verified) needs a\n * different response from the app, and one code cannot ask for two.\n */\nexport class NativeSignInUnsupportedError extends ValidationError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({\n message: data.message || 'This provider does not support native id_token sign-in.',\n details: data.details,\n });\n this.name = 'NativeSignInUnsupportedError';\n }\n}\n\n/**\n * Unverified Email Link Error (400)\n *\n * Thrown when a social identity carries an email that already belongs to an\n * account, but the provider never verified it. Linking on an unverified email\n * is account takeover, so the refusal stands and the user is sent to a path\n * that proves the address.\n *\n * This says an account exists for that address. It is not a leak introduced\n * here: the message this replaces already stated the same fact in prose, and\n * the paths that must not disclose account existence (password login, deletion\n * re-auth, verification issuance) answer uniformly and are untouched.\n */\nexport class UnverifiedEmailLinkError extends ValidationError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({\n message: data.message\n || 'Cannot link to existing account with unverified email. Please verify your email with the provider first.',\n details: data.details,\n });\n this.name = 'UnverifiedEmailLinkError';\n }\n}\n\n/**\n * Verification Token Purpose Mismatch Error (400)\n *\n * Thrown when verification token purpose doesn't match expected purpose\n */\nexport class VerificationTokenPurposeMismatchError extends ValidationError\n{\n constructor(data: { expected?: string; actual?: string; message?: string; details?: Record<string, any> } = {})\n {\n const expected = data.expected || 'unknown';\n const actual = data.actual || 'unknown';\n super({\n message: data.message || `Verification token is for ${actual}, but ${expected} was expected`,\n details: { expected, actual, ...data.details },\n });\n this.name = 'VerificationTokenPurposeMismatchError';\n }\n}\n\n/**\n * Verification Token Target Mismatch Error (400)\n *\n * Thrown when verification token target doesn't match provided email/phone\n */\nexport class VerificationTokenTargetMismatchError extends ValidationError\n{\n constructor(data: { message?: string; details?: Record<string, any> } = {})\n {\n super({\n message: data.message || 'Verification token does not match provided email/phone',\n details: data.details,\n });\n this.name = 'VerificationTokenTargetMismatchError';\n }\n}\n\n/**\n * Reserved Username Error (400)\n *\n * Thrown when trying to use a reserved/prohibited username\n */\nexport class ReservedUsernameError extends ValidationError\n{\n constructor(data: { username?: string; message?: string; details?: Record<string, any> } = {})\n {\n super({\n message: data.message || 'This username is reserved',\n details: { username: data.username, ...data.details },\n });\n this.name = 'ReservedUsernameError';\n }\n}\n\n/**\n * Username Already Taken Error (409)\n *\n * Thrown when trying to set a username that is already in use\n */\nexport class UsernameAlreadyTakenError extends ConflictError\n{\n constructor(data: { username?: string; message?: string; details?: Record<string, any> } = {})\n {\n super({\n message: data.message || 'Username is already taken',\n details: { username: data.username, ...data.details },\n });\n this.name = 'UsernameAlreadyTakenError';\n }\n}\n\n/**\n * Insufficient Permissions Error (403)\n *\n * Thrown when user lacks required permissions for the operation\n */\nexport class InsufficientPermissionsError extends ForbiddenError\n{\n constructor(data: { requiredPermissions?: string[]; message?: string; details?: Record<string, any> } = {})\n {\n const requiredPermissions = data.requiredPermissions || [];\n super({\n message: data.message || `Missing required permissions: ${requiredPermissions.join(', ')}`,\n details: { requiredPermissions, ...data.details },\n });\n this.name = 'InsufficientPermissionsError';\n }\n}\n\n/**\n * Insufficient Role Error (403)\n *\n * Thrown when user lacks required role for the operation\n */\nexport class InsufficientRoleError extends ForbiddenError\n{\n constructor(data: { requiredRoles?: string[]; message?: string; details?: Record<string, any> } = {})\n {\n const requiredRoles = data.requiredRoles || [];\n super({\n message: data.message || `Required roles: ${requiredRoles.join(', ')}`,\n details: { requiredRoles, ...data.details },\n });\n this.name = 'InsufficientRoleError';\n }\n}\n"],"mappings":";;;;;;;AAIA,SAAS,qBAAqB;;;ACJ9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AAOA,IAAM,0BAAN,cAAsC,kBAC7C;AAAA,EACI,YAAY,OAA4D,CAAC,GACzE;AACI,UAAM,EAAE,SAAS,KAAK,WAAW,uBAAuB,SAAS,KAAK,QAAQ,CAAC;AAC/E,SAAK,OAAO;AAAA,EAChB;AACJ;AAOO,IAAM,oBAAN,cAAgC,kBACvC;AAAA,EACI,YAAY,OAA4D,CAAC,GACzE;AACI,UAAM,EAAE,SAAS,KAAK,WAAW,gCAAgC,SAAS,KAAK,QAAQ,CAAC;AACxF,SAAK,OAAO;AAAA,EAChB;AACJ;AAQO,IAAM,0BAAN,cAAsC,kBAC7C;AAAA,EACI,YAAY,OAA4D,CAAC,GACzE;AACI,UAAM,EAAE,SAAS,KAAK,WAAW,2BAA2B,SAAS,KAAK,QAAQ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