@ambushsoftworks/nestjs-auth-graphql 0.9.0-rc.2 → 0.9.0-rc.4
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/CHANGELOG.md +88 -4
- package/README.md +42 -10
- package/dist/auth.module.d.ts +1 -7
- package/dist/auth.module.d.ts.map +1 -1
- package/dist/auth.module.js +61 -0
- package/dist/auth.module.js.map +1 -1
- package/package.json +7 -3
- package/dist/resolvers/auth.resolver.d.ts +0 -73
- package/dist/resolvers/auth.resolver.d.ts.map +0 -1
- package/dist/resolvers/auth.resolver.js +0 -472
- package/dist/resolvers/auth.resolver.js.map +0 -1
- package/dist/utils/passport-inspector.d.ts +0 -11
- package/dist/utils/passport-inspector.d.ts.map +0 -1
- package/dist/utils/passport-inspector.js +0 -48
- package/dist/utils/passport-inspector.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -34,6 +34,11 @@ down to what the package actually fires, a fix making
|
|
|
34
34
|
`verificationMode: 'token'` functional for the first time, and enforcement of
|
|
35
35
|
account status — which had never been checked at all. See **Security** first.
|
|
36
36
|
|
|
37
|
+
Alongside them, `bcrypt` moves from 5 to 6, taking `tar@6.2.1` and its
|
|
38
|
+
advisories out of consumers' production dependency trees (no hash migration),
|
|
39
|
+
and seven `features` flags that nothing ever read are removed — see
|
|
40
|
+
**Breaking**.
|
|
41
|
+
|
|
37
42
|
> Published as a release candidate under the `next` dist-tag first, so the
|
|
38
43
|
> verification and password-reset emails could be confirmed through a real
|
|
39
44
|
> mail client before reaching `latest`. That last hop — a mail client
|
|
@@ -41,9 +46,13 @@ account status — which had never been checked at all. See **Security** first.
|
|
|
41
46
|
> thing no test suite in this repo can exercise. Install the candidate with
|
|
42
47
|
> `npm install @ambushsoftworks/nestjs-auth-graphql@next`.
|
|
43
48
|
>
|
|
44
|
-
>
|
|
45
|
-
>
|
|
46
|
-
>
|
|
49
|
+
> **Test against `0.9.0-rc.4`.** `rc.3` added the move to bcrypt 6
|
|
50
|
+
> (**Security**) and dropped eight stale compiled files `rc.2` had shipped by
|
|
51
|
+
> mistake (**Fixed (release tooling)**); the copy of this note inside `rc.3`
|
|
52
|
+
> claims nothing else changed, which is wrong on that point. `rc.4` adds the
|
|
53
|
+
> removal of seven unread `features` flags (**Breaking**) and a build step that
|
|
54
|
+
> starts from an empty `dist/`. `rc.1` predates the account-status fix in
|
|
55
|
+
> **Security** and still has the suspension window open.
|
|
47
56
|
|
|
48
57
|
### ⚠ External configuration required
|
|
49
58
|
- **`verificationMode: 'token'` requires your frontend to serve two routes.**
|
|
@@ -101,6 +110,34 @@ account status — which had never been checked at all. See **Security** first.
|
|
|
101
110
|
still exists" — and now states the consequence. No behavioral change to that
|
|
102
111
|
mode in this release.
|
|
103
112
|
|
|
113
|
+
- **`bcrypt` 5.1.1 → 6.0.0: `tar@6.2.1` is no longer in your production dependencies.**
|
|
114
|
+
`bcrypt@5` installed its native binary through `@mapbox/node-pre-gyp@1.0.11`,
|
|
115
|
+
which depends on `tar@6.2.1` — 1 critical and 8 high advisories (path
|
|
116
|
+
traversal, file overwrite, denial of service). All three were the last release
|
|
117
|
+
of their major, so nothing on the bcrypt 5 line fixes it, and consumers could
|
|
118
|
+
not fix it either: this package declared `bcrypt ^5.1.1`, so upgrading your
|
|
119
|
+
own `bcrypt` only nested a second copy. `bcrypt@6` ships prebuilt binaries
|
|
120
|
+
loaded by `node-gyp-build`; its dependency tree is two packages and audits
|
|
121
|
+
clean. Reported by Lift, whose production-dependency audit gate flagged this
|
|
122
|
+
package as high.
|
|
123
|
+
|
|
124
|
+
**The exposure was at install time, not on the request path.** `tar` ran
|
|
125
|
+
while installing bcrypt, to unpack the downloaded binary; at runtime
|
|
126
|
+
`node-pre-gyp` loads and `tar` does not. The advisories still failed
|
|
127
|
+
`npm audit --omit=dev`, which is how consumers gate a release.
|
|
128
|
+
|
|
129
|
+
**No hash migration, in either direction.** Hashes written by bcrypt 5 verify
|
|
130
|
+
under 6 and the reverse, so existing users sign in unchanged and rolling back
|
|
131
|
+
to 0.8.0 does not lock out anyone who set a password on 0.9.0. Checked across
|
|
132
|
+
`$2a$` and `$2b$`, costs 10 and 12, unicode, and passwords past bcrypt's
|
|
133
|
+
72-byte limit, on Node 22 (glibc) and `node:20-alpine` (musl, no compiler
|
|
134
|
+
toolchain). `auth.service.password-hash-compat.spec.ts` pins it: it signs in
|
|
135
|
+
and changes passwords against hashes generated by bcrypt 5.1.1, which the
|
|
136
|
+
suite never regenerates.
|
|
137
|
+
|
|
138
|
+
**If your app also depends on `bcrypt` directly, move it to `^6.0.0`** in the
|
|
139
|
+
same deploy. Otherwise your own bcrypt 5 keeps `tar` in the tree.
|
|
140
|
+
|
|
104
141
|
### Added
|
|
105
142
|
- **`isUserActive?: (user: IAuthUser) => boolean` module option.** Overrides the
|
|
106
143
|
default account-active predicate for consumers whose status vocabulary differs
|
|
@@ -139,6 +176,16 @@ account status — which had never been checked at all. See **Security** first.
|
|
|
139
176
|
reasons, but no longer keeps it alive. `onModuleDestroy` still clears it.
|
|
140
177
|
|
|
141
178
|
### Fixed (release tooling)
|
|
179
|
+
- **`0.9.0-rc.2` shipped eight stale compiled files, and a local build could do it again.**
|
|
180
|
+
`dist/resolvers/auth.resolver.*` and `dist/utils/passport-inspector.*` were
|
|
181
|
+
output from a source removed in 0.2.0 and one never committed. `tsc` does not
|
|
182
|
+
delete output whose source is gone, and rc.2 was published by hand from a
|
|
183
|
+
`dist/` that had accumulated since November 2025. Nothing in the package
|
|
184
|
+
loaded them — `dist/index.js` is identical in rc.2 and rc.3 — and no
|
|
185
|
+
CI-published version contains them, because CI builds from a clean checkout.
|
|
186
|
+
`npm run build` now deletes `dist/` **and** `tsconfig.tsbuildinfo` before
|
|
187
|
+
compiling. Deleting `dist/` alone is not enough: with `incremental` on, `tsc`
|
|
188
|
+
reads the build-info file, decides nothing changed, and emits no files at all.
|
|
142
189
|
- **`npm run lint` had never worked.** Five ESLint packages were in
|
|
143
190
|
`devDependencies` and the script had been present for months, but no config
|
|
144
191
|
file existed anywhere, so it failed on "couldn't find a configuration file" —
|
|
@@ -163,9 +210,43 @@ account status — which had never been checked at all. See **Security** first.
|
|
|
163
210
|
- **Base URL resolution consolidated on `verification.baseUrl`.** `AuthService` no longer reads `process.env.FRONTEND_URL` directly. In code mode the legacy env var is still honored as a fallback (deprecated, logged once); in token mode `verification.baseUrl` is required and the env fallback is deliberately not consulted.
|
|
164
211
|
- Default renderer copy is now mode-aware — a token-mode verification email no longer instructs the reader to "enter the code below" when the email contains no code.
|
|
165
212
|
- `PASSWORD_RESET_COMPLETED` security-event metadata now reports the real `method` (`'code'` or `'token'`) instead of a hardcoded `'code'`.
|
|
213
|
+
- **`engines.node` is now declared as `>=18`**, which bcrypt 6 requires. This declares the floor rather than raising it: `google-auth-library@10`, a dependency since 0.1.3, already required Node 18, so no install that worked before is excluded. npm warns on an older Node rather than refusing.
|
|
166
214
|
|
|
167
215
|
### Breaking
|
|
168
|
-
-
|
|
216
|
+
- **Seven `features` flags removed: `emailVerification`, `smsVerification`, `googleOAuth`, `facebookOAuth`, `biometricAuth`, `bruteForceProtection`, `multiTenancy`.**
|
|
217
|
+
None was ever read — not in any commit to `src/`, and not in the published
|
|
218
|
+
0.4.0. Each was declared on `AuthModuleOptions.features` and documented as a
|
|
219
|
+
switch: the README said `bruteForceProtection` gave "account lockout on failed
|
|
220
|
+
logins" and `multiTenancy` would "enable TenantGuard + PermissionGuard". In
|
|
221
|
+
fact each capability was decided by configuration alone, so the flags could
|
|
222
|
+
only mislead: `bruteForceProtection: true` with no
|
|
223
|
+
`bruteForceRepositoryInstance` locked nobody out, and `multiTenancy: false`
|
|
224
|
+
did not stop `TenantGuard` enforcing tenancy wherever it was registered with a
|
|
225
|
+
`tenantRepositoryInstance` set. Reported by Lift. **No behaviour changes** —
|
|
226
|
+
every capability does exactly what it did before.
|
|
227
|
+
|
|
228
|
+
| Removed flag | What actually controls the capability |
|
|
229
|
+
|---|---|
|
|
230
|
+
| `emailVerification` | `email` or `emailServiceInstance` (delivery) and `verificationRepositoryInstance` (code storage) |
|
|
231
|
+
| `smsVerification` | `smsServiceInstance` and `verificationRepositoryInstance` |
|
|
232
|
+
| `googleOAuth` | `oauth.google`, plus `encryptionKey` |
|
|
233
|
+
| `facebookOAuth` | `oauth.facebook`, plus `encryptionKey` |
|
|
234
|
+
| `biometricAuth` | `biometricRepositoryInstance` |
|
|
235
|
+
| `bruteForceProtection` | `bruteForceRepositoryInstance` |
|
|
236
|
+
| `multiTenancy` | `tenantRepositoryInstance` and `tenantExtractorInstance`, with `TenantGuard` in your guard chain |
|
|
237
|
+
|
|
238
|
+
**Delete the keys — and do not count on the compiler to find them.**
|
|
239
|
+
TypeScript rejects a `features` object that holds only removed keys, but
|
|
240
|
+
compiles cleanly when the factory is declared `: any`, or when its parameters
|
|
241
|
+
are annotated (the usual shape with `inject`) and the same `features` object
|
|
242
|
+
also sets `cookieAuth`, `preventEnumerationOnSignup` or `verificationMode`.
|
|
243
|
+
So the module also checks at boot and logs one `Logger.warn` per ignored key,
|
|
244
|
+
naming the setting that controls that capability and whether your
|
|
245
|
+
configuration provides it. A key that was never a flag — a typo, or
|
|
246
|
+
`appleOAuth` — gets a warning too. It warns rather than failing boot because
|
|
247
|
+
an ignored key changes nothing, and failing would break every consumer who
|
|
248
|
+
set one.
|
|
249
|
+
- **`IEmailService` — four notification methods removed.** The package never fired these on its own; they were interface surface consumers had to implement for no benefit. Notification beyond verification, password-reset, and password-changed is now consumer-owned via lifecycle hooks. Only affects consumers who implement `IEmailService` **directly** — the bundled `ConfigurableEmailService`, `SendGridEmailService`, and `NoOpEmailService` are updated, so `emailServiceInstance` / `email` users need no action. **If you did implement them, those emails were never sent** — the package had no call site for any of the four, so an implementation that looked wired up was dead code, and moving it onto the hooks below is the first time it will run. Raised by Lift.
|
|
169
250
|
- `sendAccountLockedEmail` → wire from the new `onAccountLocked` hook
|
|
170
251
|
- `sendWelcomeEmail` → wire from `onSignup` (or `onEmailVerified`)
|
|
171
252
|
- `sendAccountLinkedEmail` → wire from `onOAuthAccountLinked`
|
|
@@ -175,6 +256,9 @@ account status — which had never been checked at all. See **Security** first.
|
|
|
175
256
|
|
|
176
257
|
### Documentation
|
|
177
258
|
- **`IBruteForceRepository.deleteOlderThan` contract clarified.** Documented explicitly that it is a retention operation ("prune whatever attempt history you keep, if any"), not a guarantee the caller can rely on, and that **a no-op returning `0` is a valid implementation** for schemas keeping no attempt history — e.g. `failedLoginAttempts` / `lockedUntil` as columns on the user row, overwritten in place. Raised as a question by the Ariadne team, whose schema is exactly that shape.
|
|
259
|
+
- README: the `deleteOlderThan` Prisma example no longer uses `createdAt`, and says to substitute whichever column records when an attempt happened. The name is schema-specific, and a copied name that happens to exist in your schema with a different meaning compiles and prunes the wrong rows. Raised by Lift, whose column is `attemptedAt`.
|
|
260
|
+
- README: **Installation** states the Node.js 18 floor and the platforms bcrypt ships prebuilt binaries for; **Migrating to v0.9.0** covers the bcrypt move.
|
|
261
|
+
- **Docs that described the removed flags as working are corrected.** README: the Feature Flags table lists only the three flags the package reads, followed by a table of what enables each capability; the multi-tenancy example and the brute-force section no longer mention flags; **Migrating to v0.9.0** covers the removal. The `tenantRepositoryInstance`, `tenantExtractorInstance` and `resourcePermissionRepositoryInstance` doc comments now say what each one actually does instead of pointing at `features.multiTenancy`, and the `forRootAsync` JSDoc example, which still showed class-based options that no longer exist, is rewritten. CLAUDE.md's error-handling example no longer builds on `features.emailVerification`, and MIGRATION.md's example no longer sets the flags.
|
|
178
262
|
- README: the two verification modes differ in **where the secret lives**, not merely in formatting — token mode puts the credential in the link, code mode keeps it in the body so it never reaches browser history, referrer headers, or proxy logs.
|
|
179
263
|
- README: new "Migrating to v0.9.0" section covering both workstreams — the removed interface methods with their hook-based replacements, and the action-required items for token-mode consumers (`verification.baseUrl` now required at boot; `resetPassword`/`verifyEmail` now receive a 128-character token, so input DTO constraints sized for 6-digit codes must be relaxed).
|
|
180
264
|
- README: "Verification Modes" section rewritten with a code-vs-token comparison table, the exact link format the package emits, base-URL resolution order, and guidance for custom `IEmailService` implementations.
|
package/README.md
CHANGED
|
@@ -54,6 +54,8 @@ Production-grade authentication module for NestJS GraphQL + REST APIs. JWT, cook
|
|
|
54
54
|
npm install @ambushsoftworks/nestjs-auth-graphql
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
+
Requires **Node.js 18 or later**. Passwords are hashed with the native `bcrypt` module, which ships prebuilt binaries for Linux (glibc and musl/Alpine; x64, arm64, arm), macOS, and Windows, so installing on those platforms needs no compiler toolchain.
|
|
58
|
+
|
|
57
59
|
### Peer Dependencies
|
|
58
60
|
|
|
59
61
|
```bash
|
|
@@ -327,7 +329,7 @@ Enable tenant resolution and permission checking across requests.
|
|
|
327
329
|
AuthModule.forRootAsync({
|
|
328
330
|
useFactory: (tenantRepo, tenantExtractor) => ({
|
|
329
331
|
// ...required options
|
|
330
|
-
|
|
332
|
+
// Providing the tenant repository is what enables tenancy; there is no flag.
|
|
331
333
|
tenantRepositoryInstance: tenantRepo,
|
|
332
334
|
tenantExtractorInstance: tenantExtractor,
|
|
333
335
|
}),
|
|
@@ -695,7 +697,7 @@ The `OAuthController` is automatically registered and handles OAuth callback rou
|
|
|
695
697
|
|
|
696
698
|
### Brute Force Protection
|
|
697
699
|
|
|
698
|
-
|
|
700
|
+
Provide a `bruteForceRepositoryInstance` and the module tracks failed login attempts and temporarily locks accounts. Without one, `NoOpBruteForceRepository` is used and no account is ever locked; there is no flag to set. The lockout policy (attempt thresholds, lockout duration) is determined by your `IBruteForceRepository` implementation.
|
|
699
701
|
|
|
700
702
|
#### IP Rate Limiting
|
|
701
703
|
|
|
@@ -765,7 +767,7 @@ export class BruteForceCleanupJob {
|
|
|
765
767
|
}
|
|
766
768
|
```
|
|
767
769
|
|
|
768
|
-
This requires `IBruteForceRepository.deleteOlderThan(beforeDate: Date): Promise<number>` on your repository implementation. Reference Prisma implementation: `return (await this.prisma.bruteForceAttempt.deleteMany({ where: {
|
|
770
|
+
This requires `IBruteForceRepository.deleteOlderThan(beforeDate: Date): Promise<number>` on your repository implementation. Reference Prisma implementation: `return (await this.prisma.bruteForceAttempt.deleteMany({ where: { attemptedAt: { lt: beforeDate } } })).count;` — substitute whichever column records when the attempt happened, and check the name against your schema rather than copying it. Multi-replica deployments should coordinate at the cron layer (advisory lock, leader election) or accept the duplicate-delete cost — a timestamp-bounded `DELETE` is idempotent.
|
|
769
771
|
|
|
770
772
|
#### Stay Logged In After Password Change
|
|
771
773
|
|
|
@@ -896,15 +898,21 @@ jwtPayloadFactoryInstance: {
|
|
|
896
898
|
| Flag | Default | Description |
|
|
897
899
|
|------|---------|-------------|
|
|
898
900
|
| `cookieAuth` | `false` | Token delivery via HttpOnly cookies |
|
|
899
|
-
| `multiTenancy` | `false` | Enable TenantGuard + PermissionGuard |
|
|
900
|
-
| `bruteForceProtection` | `false` | Account lockout on failed logins |
|
|
901
901
|
| `preventEnumerationOnSignup` | `false` | Return synthetic success for duplicate emails |
|
|
902
902
|
| `verificationMode` | `'code'` | `'code'` for 6-digit codes, `'token'` for URL tokens |
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
|
907
|
-
|
|
903
|
+
|
|
904
|
+
Capabilities are not switched on by flags. They follow from what you configure:
|
|
905
|
+
|
|
906
|
+
| Capability | Enabled by |
|
|
907
|
+
|------------|------------|
|
|
908
|
+
| Email verification | `email` or `emailServiceInstance` to deliver, `verificationRepositoryInstance` to store codes |
|
|
909
|
+
| SMS verification | `smsServiceInstance`, plus `verificationRepositoryInstance` |
|
|
910
|
+
| Google / Facebook sign-in | `oauth.google` / `oauth.facebook`, plus `encryptionKey` |
|
|
911
|
+
| Biometric authentication | `biometricRepositoryInstance` |
|
|
912
|
+
| Account lockout | `bruteForceRepositoryInstance` |
|
|
913
|
+
| Multi-tenancy | `tenantRepositoryInstance` and `tenantExtractorInstance`, with `TenantGuard` in your guard chain |
|
|
914
|
+
|
|
915
|
+
Leave one out and that capability quietly does nothing: the package substitutes a no-op implementation, or `TenantGuard` passes every request. The flags `emailVerification`, `smsVerification`, `googleOAuth`, `facebookOAuth`, `biometricAuth`, `bruteForceProtection` and `multiTenancy` were removed in 0.9.0 because nothing read them — see [Migrating to v0.9.0](#migrating-to-v090).
|
|
908
916
|
|
|
909
917
|
### Security Secrets
|
|
910
918
|
|
|
@@ -1107,6 +1115,30 @@ Token TTL also differs from code TTL: 60 minutes by default
|
|
|
1107
1115
|
**`verificationMode: 'code'` — the default — is unaffected.** Behaviour is
|
|
1108
1116
|
identical, including the legacy `FRONTEND_URL` fallback for the reset page URL.
|
|
1109
1117
|
|
|
1118
|
+
**`bcrypt` 5 → 6.** No code change and no hash migration: existing hashes
|
|
1119
|
+
verify unchanged, and hashes written by 0.9.0 still verify if you roll back to
|
|
1120
|
+
0.8.0. The move exists because bcrypt 5 pulls in `tar@6.2.1` (1 critical, 8
|
|
1121
|
+
high advisories) through `@mapbox/node-pre-gyp`, with no fix on the 5 line.
|
|
1122
|
+
|
|
1123
|
+
- **If your app also depends on `bcrypt` directly, move it to `^6.0.0` in the
|
|
1124
|
+
same deploy.** Otherwise npm installs both, and your bcrypt 5 keeps `tar` in
|
|
1125
|
+
your tree.
|
|
1126
|
+
- **Node.js 18 or later**, now declared in `engines`. It was already required
|
|
1127
|
+
by `google-auth-library@10`, so an install that worked before still works.
|
|
1128
|
+
|
|
1129
|
+
**Breaking — seven `features` flags removed.** `emailVerification`,
|
|
1130
|
+
`smsVerification`, `googleOAuth`, `facebookOAuth`, `biometricAuth`,
|
|
1131
|
+
`bruteForceProtection` and `multiTenancy` were never read, so removing them
|
|
1132
|
+
changes no behaviour. Delete them from your `features` block. What each
|
|
1133
|
+
capability actually depends on is in the table under
|
|
1134
|
+
[Feature Flags](#feature-flags-features).
|
|
1135
|
+
|
|
1136
|
+
The compiler may not point them out: a factory declared `: any`, or one with
|
|
1137
|
+
annotated parameters whose `features` object also sets a flag that still
|
|
1138
|
+
exists, compiles with a removed key in it. The module logs a warning at boot
|
|
1139
|
+
for every ignored key, naming the setting that really controls that capability
|
|
1140
|
+
and whether you provide it — check your startup logs after upgrading.
|
|
1141
|
+
|
|
1110
1142
|
**Additive — new behaviour, no action required.**
|
|
1111
1143
|
|
|
1112
1144
|
- `BaseAuthResolver.performRefreshToken` and `performLogout` now fall back to the refresh cookie when `features.cookieAuth: true` and `input.refreshToken` is empty. Your consumer `RefreshTokenInput` / `LogoutInput` DTOs should mark `refreshToken` `@IsOptional()` for browser flows. Explicit `input.refreshToken` still wins for non-browser callers.
|
package/dist/auth.module.d.ts
CHANGED
|
@@ -56,13 +56,6 @@ export interface AuthModuleOptions {
|
|
|
56
56
|
isUserActive?: (user: IAuthUser) => boolean;
|
|
57
57
|
bcryptRounds?: number;
|
|
58
58
|
features?: {
|
|
59
|
-
emailVerification?: boolean;
|
|
60
|
-
smsVerification?: boolean;
|
|
61
|
-
googleOAuth?: boolean;
|
|
62
|
-
facebookOAuth?: boolean;
|
|
63
|
-
biometricAuth?: boolean;
|
|
64
|
-
bruteForceProtection?: boolean;
|
|
65
|
-
multiTenancy?: boolean;
|
|
66
59
|
preventEnumerationOnSignup?: boolean;
|
|
67
60
|
cookieAuth?: boolean;
|
|
68
61
|
verificationMode?: 'code' | 'token';
|
|
@@ -128,6 +121,7 @@ export interface AuthModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'>
|
|
|
128
121
|
inject?: any[];
|
|
129
122
|
}
|
|
130
123
|
export declare function validateAuthModuleOptions(opts: AuthModuleOptions): void;
|
|
124
|
+
export declare function describeIgnoredFeatureFlags(opts: AuthModuleOptions): string[];
|
|
131
125
|
export { AUTH_MODULE_OPTIONS, USER_REPOSITORY, REFRESH_TOKEN_REPOSITORY, EMAIL_SERVICE, SMS_SERVICE, AUTH_LIFECYCLE_HOOKS, VERIFICATION_REPOSITORY, BRUTE_FORCE_REPOSITORY, BIOMETRIC_REPOSITORY, AUTH_LOGGER, RATE_LIMITER, TENANT_REPOSITORY, TENANT_EXTRACTOR, RESOURCE_PERMISSION_REPOSITORY, JWT_PAYLOAD_FACTORY, API_KEY_REPOSITORY, } from './constants';
|
|
132
126
|
export declare class AuthModule implements NestModule {
|
|
133
127
|
configure(consumer: MiddlewareConsumer): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.module.d.ts","sourceRoot":"","sources":["../src/auth.module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,kBAAkB,EAElB,UAAU,EAGX,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AA0B3D,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,iDAAiD,CAAC;AAC1F,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAWjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,uDAAuD,CAAC;AACtG,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AA8B9E,OAAO,EAAE,o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AAG,IAAI;IAkC7C,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,sBAAsB,GAAG,aAAa;CAyYpE"}
|
package/dist/auth.module.js
CHANGED
|
@@ -9,6 +9,7 @@ var AuthModule_1;
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.AuthModule = exports.API_KEY_REPOSITORY = exports.JWT_PAYLOAD_FACTORY = exports.RESOURCE_PERMISSION_REPOSITORY = exports.TENANT_EXTRACTOR = exports.TENANT_REPOSITORY = exports.RATE_LIMITER = exports.AUTH_LOGGER = exports.BIOMETRIC_REPOSITORY = exports.BRUTE_FORCE_REPOSITORY = exports.VERIFICATION_REPOSITORY = exports.AUTH_LIFECYCLE_HOOKS = exports.SMS_SERVICE = exports.EMAIL_SERVICE = exports.REFRESH_TOKEN_REPOSITORY = exports.USER_REPOSITORY = exports.AUTH_MODULE_OPTIONS = void 0;
|
|
11
11
|
exports.validateAuthModuleOptions = validateAuthModuleOptions;
|
|
12
|
+
exports.describeIgnoredFeatureFlags = describeIgnoredFeatureFlags;
|
|
12
13
|
const common_1 = require("@nestjs/common");
|
|
13
14
|
const realm_middleware_1 = require("./middleware/realm.middleware");
|
|
14
15
|
const jwt_1 = require("@nestjs/jwt");
|
|
@@ -66,6 +67,63 @@ function validateAuthModuleOptions(opts) {
|
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
}
|
|
70
|
+
const READ_FEATURE_FLAGS = ['cookieAuth', 'preventEnumerationOnSignup', 'verificationMode'];
|
|
71
|
+
const REMOVED_FEATURE_FLAGS = {
|
|
72
|
+
emailVerification: {
|
|
73
|
+
controlledBy: 'Email verification is delivered by `email` or `emailServiceInstance` and stored by `verificationRepositoryInstance`',
|
|
74
|
+
checks: [
|
|
75
|
+
['`email` or `emailServiceInstance`', (o) => Boolean(o.email || o.emailServiceInstance)],
|
|
76
|
+
['`verificationRepositoryInstance`', (o) => Boolean(o.verificationRepositoryInstance)],
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
smsVerification: {
|
|
80
|
+
controlledBy: 'SMS verification is delivered by `smsServiceInstance` and stored by `verificationRepositoryInstance`',
|
|
81
|
+
checks: [
|
|
82
|
+
['`smsServiceInstance`', (o) => Boolean(o.smsServiceInstance)],
|
|
83
|
+
['`verificationRepositoryInstance`', (o) => Boolean(o.verificationRepositoryInstance)],
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
googleOAuth: {
|
|
87
|
+
controlledBy: 'Google sign-in is enabled by `oauth.google`',
|
|
88
|
+
checks: [['`oauth.google.clientId`', (o) => Boolean(o.oauth?.google?.clientId)]],
|
|
89
|
+
},
|
|
90
|
+
facebookOAuth: {
|
|
91
|
+
controlledBy: 'Facebook sign-in is enabled by `oauth.facebook`',
|
|
92
|
+
checks: [
|
|
93
|
+
['`oauth.facebook.clientId`', (o) => Boolean(o.oauth?.facebook?.clientId)],
|
|
94
|
+
['`oauth.facebook.clientSecret`', (o) => Boolean(o.oauth?.facebook?.clientSecret)],
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
biometricAuth: {
|
|
98
|
+
controlledBy: 'Biometric authentication is enabled by `biometricRepositoryInstance`',
|
|
99
|
+
checks: [['`biometricRepositoryInstance`', (o) => Boolean(o.biometricRepositoryInstance)]],
|
|
100
|
+
},
|
|
101
|
+
bruteForceProtection: {
|
|
102
|
+
controlledBy: 'Account lockout is enabled by `bruteForceRepositoryInstance`; without it no account is ever locked',
|
|
103
|
+
checks: [['`bruteForceRepositoryInstance`', (o) => Boolean(o.bruteForceRepositoryInstance)]],
|
|
104
|
+
},
|
|
105
|
+
multiTenancy: {
|
|
106
|
+
controlledBy: 'Tenant enforcement is enabled by `tenantRepositoryInstance`, applied by `TenantGuard` wherever you register it',
|
|
107
|
+
checks: [['`tenantRepositoryInstance`', (o) => Boolean(o.tenantRepositoryInstance)]],
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
function describeIgnoredFeatureFlags(opts) {
|
|
111
|
+
const readFlags = READ_FEATURE_FLAGS;
|
|
112
|
+
return Object.keys(opts.features ?? {})
|
|
113
|
+
.filter((key) => !readFlags.includes(key))
|
|
114
|
+
.map((key) => {
|
|
115
|
+
const removed = REMOVED_FEATURE_FLAGS[key];
|
|
116
|
+
if (!removed) {
|
|
117
|
+
return (`[AuthModule] features.${key} is not a feature flag and is ignored. ` +
|
|
118
|
+
`The flags the package reads are: ${READ_FEATURE_FLAGS.join(', ')}.`);
|
|
119
|
+
}
|
|
120
|
+
const state = removed.checks
|
|
121
|
+
.map(([setting, isProvided]) => `${setting} is ${isProvided(opts) ? 'set' : 'not set'}`)
|
|
122
|
+
.join('; ');
|
|
123
|
+
return (`[AuthModule] features.${key} is ignored: it was removed in 0.9.0, and no version ever read it. ` +
|
|
124
|
+
`${removed.controlledBy}. In this configuration, ${state}. Remove the key.`);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
69
127
|
function validateVerificationOptions(opts) {
|
|
70
128
|
if ((opts.features?.verificationMode ?? 'code') !== 'token') {
|
|
71
129
|
return;
|
|
@@ -120,6 +178,9 @@ let AuthModule = AuthModule_1 = class AuthModule {
|
|
|
120
178
|
useFactory: async (...args) => {
|
|
121
179
|
const opts = await options.useFactory(...args);
|
|
122
180
|
validateAuthModuleOptions(opts);
|
|
181
|
+
for (const warning of describeIgnoredFeatureFlags(opts)) {
|
|
182
|
+
common_1.Logger.warn(warning, 'AuthModule');
|
|
183
|
+
}
|
|
123
184
|
if (opts.cookie?.useHostPrefix) {
|
|
124
185
|
if (opts.cookie.secure === false) {
|
|
125
186
|
throw new Error('[AuthModule] cookie.useHostPrefix requires cookie.secure to be true (or unset). ' +
|
package/dist/auth.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../src/auth.module.ts"],"names":[],"mappings":";;;;;;;;;;AAioBA,8DAqCC;AAtqBD,2CAOwB;AACxB,oEAAgE;AAChE,qCAAwC;AACxC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ACnB,sCAAiB;gBACjB,uCAAiB;gBACjB,4DAA2B;gBAE3B,6CAAoB;gBAEpB,6DAA4B;gBAC5B,sDAAwB;gBACxB,uBAAW;gBACX,2BAAe;gBACf,oCAAwB;gBACxB,6BAAiB;gBACjB,4BAAgB;gBAChB,2BAAe;gBACf,0CAA8B;gBAC9B,+BAAmB;gBACnB,8BAAkB;gBAClB,0BAAW;gBACX,kCAAe;gBACf,eAAS;gBACT,yBAAc;aACf;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AA5aY,gCAAU;qBAAV,UAAU;IADtB,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,UAAU,CA4atB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ambushsoftworks/nestjs-auth-graphql",
|
|
3
|
-
"version": "0.9.0-rc.
|
|
3
|
+
"version": "0.9.0-rc.4",
|
|
4
4
|
"description": "Production-grade authentication package for NestJS with GraphQL, supporting JWT, OAuth, email/SMS verification, and biometric auth",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"LICENSE"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
+
"prebuild": "node -e \"for (const p of ['dist', 'tsconfig.tsbuildinfo']) require('fs').rmSync(p, { recursive: true, force: true })\"",
|
|
15
16
|
"build": "tsc",
|
|
16
17
|
"build:watch": "tsc --watch",
|
|
17
18
|
"test": "jest",
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
},
|
|
65
66
|
"dependencies": {
|
|
66
67
|
"@sendgrid/mail": "^8.1.6",
|
|
67
|
-
"bcrypt": "^
|
|
68
|
+
"bcrypt": "^6.0.0",
|
|
68
69
|
"class-transformer": "^0.5.1",
|
|
69
70
|
"class-validator": "^0.14.1",
|
|
70
71
|
"google-auth-library": "^10.5.0",
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
"@nestjs/config": "^3.3.0",
|
|
79
80
|
"@nestjs/testing": "^10.3.1",
|
|
80
81
|
"@nestjs/throttler": "^6.4.0",
|
|
81
|
-
"@types/bcrypt": "^
|
|
82
|
+
"@types/bcrypt": "^6.0.0",
|
|
82
83
|
"@types/jest": "^29.5.11",
|
|
83
84
|
"@types/node": "^20.11.5",
|
|
84
85
|
"@types/passport-google-oauth20": "^2.0.17",
|
|
@@ -112,5 +113,8 @@
|
|
|
112
113
|
],
|
|
113
114
|
"coverageDirectory": "../coverage",
|
|
114
115
|
"testEnvironment": "node"
|
|
116
|
+
},
|
|
117
|
+
"engines": {
|
|
118
|
+
"node": ">=18"
|
|
115
119
|
}
|
|
116
120
|
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { AuthService } from '../services/auth.service';
|
|
2
|
-
import { AuthResponseBase } from '../dto/auth-response.dto';
|
|
3
|
-
import { AuthUser } from '../entities/auth-user.entity';
|
|
4
|
-
declare class AuthResponse implements AuthResponseBase<AuthUser> {
|
|
5
|
-
accessToken: string;
|
|
6
|
-
refreshToken: string;
|
|
7
|
-
user: AuthUser;
|
|
8
|
-
}
|
|
9
|
-
import { AuthSignupInput } from '../dto/signup.input';
|
|
10
|
-
import { AuthLoginInput } from '../dto/login.input';
|
|
11
|
-
import { AuthRefreshTokenInput } from '../dto/refresh-token.input';
|
|
12
|
-
import { AuthLogoutInput } from '../dto/logout.input';
|
|
13
|
-
import { AuthLogoutResponse, AuthLogoutAllResponse } from '../dto/logout-response.dto';
|
|
14
|
-
import { AuthAccountLockStatus } from '../dto/account-lock-status.dto';
|
|
15
|
-
import { AuthVerifyEmailInput } from '../dto/verify-email.input';
|
|
16
|
-
import { AuthVerifyEmailResponse } from '../dto/verify-email-response.dto';
|
|
17
|
-
import { AuthSendPhoneVerificationInput } from '../dto/send-phone-verification.input';
|
|
18
|
-
import { AuthVerifyPhoneInput } from '../dto/verify-phone.input';
|
|
19
|
-
import { AuthPhoneVerificationResponse, AuthVerifyPhoneResponse, AuthRemovePhoneResponse } from '../dto/phone-verification-response.dto';
|
|
20
|
-
import { AuthPhoneVerificationStatus } from '../dto/phone-verification-status.dto';
|
|
21
|
-
import { AuthCompleteFacebookSignUpInput } from '../dto/complete-facebook-signup.input';
|
|
22
|
-
import { AuthUnlinkSocialAccountInput } from '../dto/unlink-social-account.input';
|
|
23
|
-
import { AuthUnlinkSocialAccountResponse } from '../dto/unlink-social-account-response.dto';
|
|
24
|
-
import { AuthEnableBiometricInput } from '../dto/enable-biometric.input';
|
|
25
|
-
import { AuthBiometricLoginInput } from '../dto/biometric-login.input';
|
|
26
|
-
import { AuthBiometricStatusResponse } from '../dto/biometric-status.dto';
|
|
27
|
-
import { EnrollBiometricInput } from '../dto/enroll-biometric.input';
|
|
28
|
-
import { VerifyBiometricSignatureInput } from '../dto/verify-biometric-signature.input';
|
|
29
|
-
import { BiometricCredentialDto } from '../dto/biometric-credential.dto';
|
|
30
|
-
import { BiometricChallengeDto } from '../dto/biometric-challenge.dto';
|
|
31
|
-
import { RemoveBiometricDeviceResponse } from '../dto/remove-biometric-device-response.dto';
|
|
32
|
-
import { BruteForceProtectionService } from '../services/brute-force-protection.service';
|
|
33
|
-
import { OAuthLinkingTokenService } from '../services/oauth-linking-token.service';
|
|
34
|
-
import { BiometricAuthService } from '../services/biometric-auth.service';
|
|
35
|
-
import { BiometricVerificationService } from '../services/biometric-verification.service';
|
|
36
|
-
import { IUserRepository } from '../interfaces/user-repository.interface';
|
|
37
|
-
import { IAuthUser } from '../interfaces/auth-user.interface';
|
|
38
|
-
export declare class AuthResolver {
|
|
39
|
-
private authService;
|
|
40
|
-
private bruteForceProtection;
|
|
41
|
-
private oauthLinkingTokenService;
|
|
42
|
-
private biometricAuthService;
|
|
43
|
-
private biometricVerificationService;
|
|
44
|
-
private userRepository;
|
|
45
|
-
private readonly logger;
|
|
46
|
-
constructor(authService: AuthService, bruteForceProtection: BruteForceProtectionService, oauthLinkingTokenService: OAuthLinkingTokenService, biometricAuthService: BiometricAuthService, biometricVerificationService: BiometricVerificationService, userRepository: IUserRepository<IAuthUser>);
|
|
47
|
-
signup(input: AuthSignupInput): Promise<AuthResponse>;
|
|
48
|
-
login(input: AuthLoginInput, context: any): Promise<AuthResponse>;
|
|
49
|
-
refreshToken(input: AuthRefreshTokenInput): Promise<AuthResponse>;
|
|
50
|
-
logout(input: AuthLogoutInput, user: IAuthUser): Promise<AuthLogoutResponse>;
|
|
51
|
-
logoutAll(user: IAuthUser): Promise<AuthLogoutAllResponse>;
|
|
52
|
-
checkAuthAccountLockStatus(email: string): Promise<AuthAccountLockStatus>;
|
|
53
|
-
verifyEmail(input: AuthVerifyEmailInput): Promise<AuthVerifyEmailResponse>;
|
|
54
|
-
resendVerificationEmail(email: string): Promise<AuthVerifyEmailResponse>;
|
|
55
|
-
sendPhoneVerification(input: AuthSendPhoneVerificationInput, user: IAuthUser): Promise<AuthPhoneVerificationResponse>;
|
|
56
|
-
verifyPhone(input: AuthVerifyPhoneInput, user: IAuthUser): Promise<AuthVerifyPhoneResponse>;
|
|
57
|
-
resendPhoneVerification(phoneNumber: string, user: IAuthUser): Promise<AuthPhoneVerificationResponse>;
|
|
58
|
-
removePhoneNumber(user: IAuthUser): Promise<AuthRemovePhoneResponse>;
|
|
59
|
-
phoneVerificationStatus(user: IAuthUser): Promise<AuthPhoneVerificationStatus>;
|
|
60
|
-
completeFacebookSignUp(input: AuthCompleteFacebookSignUpInput): Promise<AuthResponse>;
|
|
61
|
-
unlinkSocialAccount(input: AuthUnlinkSocialAccountInput, user: IAuthUser): Promise<AuthUnlinkSocialAccountResponse>;
|
|
62
|
-
enableBiometric(input: AuthEnableBiometricInput, user: IAuthUser): Promise<boolean>;
|
|
63
|
-
disableBiometric(user: IAuthUser): Promise<boolean>;
|
|
64
|
-
biometricLogin(input: AuthBiometricLoginInput): Promise<AuthResponse>;
|
|
65
|
-
biometricStatus(user: IAuthUser): Promise<AuthBiometricStatusResponse>;
|
|
66
|
-
enrollBiometric(input: EnrollBiometricInput, user: IAuthUser): Promise<BiometricCredentialDto>;
|
|
67
|
-
requestBiometricChallenge(deviceId: string, user: IAuthUser): Promise<BiometricChallengeDto>;
|
|
68
|
-
verifyBiometricSignature(input: VerifyBiometricSignatureInput): Promise<AuthResponse>;
|
|
69
|
-
removeBiometricDevice(deviceId: string, user: IAuthUser): Promise<RemoveBiometricDeviceResponse>;
|
|
70
|
-
biometricDevices(user: IAuthUser): Promise<BiometricCredentialDto[]>;
|
|
71
|
-
}
|
|
72
|
-
export {};
|
|
73
|
-
//# sourceMappingURL=auth.resolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.resolver.d.ts","sourceRoot":"","sources":["../../src/resolvers/auth.resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGxD,cACM,YAAa,YAAW,gBAAgB,CAAC,QAAQ,CAAC;IAEtD,WAAW,EAAE,MAAM,CAAC;IAGpB,YAAY,EAAE,MAAM,CAAC;IAGrB,IAAI,EAAE,QAAQ,CAAC;CAChB;AACD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3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AAiB,CAAgB,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAOnF,uBAAuB,CACZ,IAAI,EAAE,SAAS,GAC7B,OAAO,CAAC,2BAA2B,CAAC;IAmFjC,sBAAsB,CACX,KAAK,EAAE,+BAA+B,GACpD,OAAO,CAAC,YAAY,CAAC;IA6ClB,mBAAmB,CACR,KAAK,EAAE,4BAA4B,EACnC,IAAI,EAAE,SAAS,GAC7B,OAAO,CAAC,+BAA+B,CAAC;IAyCrC,eAAe,CACJ,KAAK,EAAE,wBAAwB,EAC/B,IAAI,EAAE,SAAS,GAC7B,OAAO,CAAC,OAAO,CAAC;IAkCb,gBAAgB,CAAgB,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;IAkClE,cAAc,CACH,KAAK,EAAE,uBAAuB,GAC5C,OAAO,CAAC,YAAY,CAAC;IA0ClB,eAAe,CACJ,IAAI,EAAE,SAAS,GAC7B,OAAO,CAAC,2BAA2B,CAAC;IA8BjC,eAAe,CACJ,KAAK,EAAE,oBAAoB,EAC3B,IAAI,EAAE,SAAS,GAC7B,OAAO,CAAC,sBAAsB,CAAC;IA6B5B,yBAAyB,CACX,QAAQ,EAAE,MAAM,EACnB,IAAI,EAAE,SAAS,GAC7B,OAAO,CAAC,qBAAqB,CAAC;IAkC3B,wBAAwB,CACb,KAAK,EAAE,6BAA6B,GAClD,OAAO,CAAC,YAAY,CAAC;IA6BlB,qBAAqB,CACP,QAAQ,EAAE,MAAM,EACnB,IAAI,EAAE,SAAS,GAC7B,OAAO,CAAC,6BAA6B,CAAC;IA0BnC,gBAAgB,CACL,IAAI,EAAE,SAAS,GAC7B,OAAO,CAAC,sBAAsB,EAAE,CAAC;CAMrC"}
|
|
@@ -1,472 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
var AuthResolver_1;
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.AuthResolver = void 0;
|
|
17
|
-
const graphql_1 = require("@nestjs/graphql");
|
|
18
|
-
const common_1 = require("@nestjs/common");
|
|
19
|
-
const throttler_1 = require("@nestjs/throttler");
|
|
20
|
-
const graphql_2 = require("@nestjs/graphql");
|
|
21
|
-
const auth_service_1 = require("../services/auth.service");
|
|
22
|
-
const jwt_auth_guard_1 = require("../guards/jwt-auth.guard");
|
|
23
|
-
const current_user_decorator_1 = require("../decorators/current-user.decorator");
|
|
24
|
-
const auth_user_entity_1 = require("../entities/auth-user.entity");
|
|
25
|
-
let AuthResponse = class AuthResponse {
|
|
26
|
-
};
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, graphql_2.Field)(),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], AuthResponse.prototype, "accessToken", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, graphql_2.Field)(),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], AuthResponse.prototype, "refreshToken", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, graphql_2.Field)(() => auth_user_entity_1.AuthUser),
|
|
37
|
-
__metadata("design:type", auth_user_entity_1.AuthUser)
|
|
38
|
-
], AuthResponse.prototype, "user", void 0);
|
|
39
|
-
AuthResponse = __decorate([
|
|
40
|
-
(0, graphql_2.ObjectType)()
|
|
41
|
-
], AuthResponse);
|
|
42
|
-
const signup_input_1 = require("../dto/signup.input");
|
|
43
|
-
const login_input_1 = require("../dto/login.input");
|
|
44
|
-
const refresh_token_input_1 = require("../dto/refresh-token.input");
|
|
45
|
-
const logout_input_1 = require("../dto/logout.input");
|
|
46
|
-
const logout_response_dto_1 = require("../dto/logout-response.dto");
|
|
47
|
-
const account_lock_status_dto_1 = require("../dto/account-lock-status.dto");
|
|
48
|
-
const verify_email_input_1 = require("../dto/verify-email.input");
|
|
49
|
-
const verify_email_response_dto_1 = require("../dto/verify-email-response.dto");
|
|
50
|
-
const send_phone_verification_input_1 = require("../dto/send-phone-verification.input");
|
|
51
|
-
const verify_phone_input_1 = require("../dto/verify-phone.input");
|
|
52
|
-
const phone_verification_response_dto_1 = require("../dto/phone-verification-response.dto");
|
|
53
|
-
const phone_verification_status_dto_1 = require("../dto/phone-verification-status.dto");
|
|
54
|
-
const complete_facebook_signup_input_1 = require("../dto/complete-facebook-signup.input");
|
|
55
|
-
const unlink_social_account_input_1 = require("../dto/unlink-social-account.input");
|
|
56
|
-
const unlink_social_account_response_dto_1 = require("../dto/unlink-social-account-response.dto");
|
|
57
|
-
const enable_biometric_input_1 = require("../dto/enable-biometric.input");
|
|
58
|
-
const biometric_login_input_1 = require("../dto/biometric-login.input");
|
|
59
|
-
const biometric_status_dto_1 = require("../dto/biometric-status.dto");
|
|
60
|
-
const enroll_biometric_input_1 = require("../dto/enroll-biometric.input");
|
|
61
|
-
const verify_biometric_signature_input_1 = require("../dto/verify-biometric-signature.input");
|
|
62
|
-
const biometric_credential_dto_1 = require("../dto/biometric-credential.dto");
|
|
63
|
-
const biometric_challenge_dto_1 = require("../dto/biometric-challenge.dto");
|
|
64
|
-
const remove_biometric_device_response_dto_1 = require("../dto/remove-biometric-device-response.dto");
|
|
65
|
-
const brute_force_protection_service_1 = require("../services/brute-force-protection.service");
|
|
66
|
-
const oauth_linking_token_service_1 = require("../services/oauth-linking-token.service");
|
|
67
|
-
const biometric_auth_service_1 = require("../services/biometric-auth.service");
|
|
68
|
-
const biometric_verification_service_1 = require("../services/biometric-verification.service");
|
|
69
|
-
let AuthResolver = AuthResolver_1 = class AuthResolver {
|
|
70
|
-
constructor(authService, bruteForceProtection, oauthLinkingTokenService, biometricAuthService, biometricVerificationService, userRepository) {
|
|
71
|
-
this.authService = authService;
|
|
72
|
-
this.bruteForceProtection = bruteForceProtection;
|
|
73
|
-
this.oauthLinkingTokenService = oauthLinkingTokenService;
|
|
74
|
-
this.biometricAuthService = biometricAuthService;
|
|
75
|
-
this.biometricVerificationService = biometricVerificationService;
|
|
76
|
-
this.userRepository = userRepository;
|
|
77
|
-
this.logger = new common_1.Logger(AuthResolver_1.name);
|
|
78
|
-
}
|
|
79
|
-
async signup(input) {
|
|
80
|
-
const result = await this.authService.signup(input.email, input.password);
|
|
81
|
-
return {
|
|
82
|
-
...result,
|
|
83
|
-
user: auth_user_entity_1.AuthUser.fromInterface(result.user),
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
async login(input, context) {
|
|
87
|
-
const ipAddress = context.req?.clientIp || context.req?.ip || 'unknown';
|
|
88
|
-
this.logger.log(`[AUTH_RESOLVER] Login attempt for email: ${input.email} from IP: ${ipAddress}`);
|
|
89
|
-
const result = await this.authService.login(input.email, input.password, ipAddress);
|
|
90
|
-
return {
|
|
91
|
-
...result,
|
|
92
|
-
user: auth_user_entity_1.AuthUser.fromInterface(result.user),
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
async refreshToken(input) {
|
|
96
|
-
const result = await this.authService.refreshToken(input.refreshToken);
|
|
97
|
-
return {
|
|
98
|
-
...result,
|
|
99
|
-
user: auth_user_entity_1.AuthUser.fromInterface(result.user),
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
async logout(input, user) {
|
|
103
|
-
const success = await this.authService.logout(input.refreshToken, user.id);
|
|
104
|
-
return {
|
|
105
|
-
success,
|
|
106
|
-
message: success
|
|
107
|
-
? 'Successfully logged out'
|
|
108
|
-
: 'Refresh token not found or already invalidated',
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
async logoutAll(user) {
|
|
112
|
-
const count = await this.authService.logoutAll(user.id);
|
|
113
|
-
return {
|
|
114
|
-
count,
|
|
115
|
-
message: `Successfully logged out from ${count} device(s)`,
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
async checkAuthAccountLockStatus(email) {
|
|
119
|
-
const locked = await this.bruteForceProtection.isAccountLocked(email);
|
|
120
|
-
const remainingTime = locked
|
|
121
|
-
? await this.bruteForceProtection.getRemainingLockoutTime(email)
|
|
122
|
-
: 0;
|
|
123
|
-
return {
|
|
124
|
-
locked,
|
|
125
|
-
remainingTime,
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
async verifyEmail(input) {
|
|
129
|
-
return this.authService.verifyEmail(input.email, input.code);
|
|
130
|
-
}
|
|
131
|
-
async resendVerificationEmail(email) {
|
|
132
|
-
return this.authService.resendVerificationEmail(email);
|
|
133
|
-
}
|
|
134
|
-
async sendPhoneVerification(input, user) {
|
|
135
|
-
return this.authService.sendPhoneVerification(user.id, input.phoneNumber, input.countryCode);
|
|
136
|
-
}
|
|
137
|
-
async verifyPhone(input, user) {
|
|
138
|
-
return this.authService.verifyPhone(user.id, input.phoneNumber, input.code);
|
|
139
|
-
}
|
|
140
|
-
async resendPhoneVerification(phoneNumber, user) {
|
|
141
|
-
return this.authService.resendPhoneVerification(user.id, phoneNumber);
|
|
142
|
-
}
|
|
143
|
-
async removePhoneNumber(user) {
|
|
144
|
-
return this.authService.removePhoneNumber(user.id);
|
|
145
|
-
}
|
|
146
|
-
async phoneVerificationStatus(user) {
|
|
147
|
-
const userRecord = await this.userRepository.findById(user.id);
|
|
148
|
-
if (!userRecord) {
|
|
149
|
-
throw new Error('User not found');
|
|
150
|
-
}
|
|
151
|
-
let canResendInSeconds = undefined;
|
|
152
|
-
if (userRecord.phoneVerificationSentAt) {
|
|
153
|
-
const timeSinceLastSent = Date.now() - userRecord.phoneVerificationSentAt.getTime();
|
|
154
|
-
const cooldownMs = 60 * 1000;
|
|
155
|
-
if (timeSinceLastSent < cooldownMs) {
|
|
156
|
-
canResendInSeconds = Math.ceil((cooldownMs - timeSinceLastSent) / 1000);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
let maskedPhoneNumber = undefined;
|
|
160
|
-
if (userRecord.phoneNumber) {
|
|
161
|
-
maskedPhoneNumber = this.authService['smsService'].maskPhoneNumber(userRecord.phoneNumber);
|
|
162
|
-
}
|
|
163
|
-
return {
|
|
164
|
-
phoneVerified: userRecord.phoneVerified ?? false,
|
|
165
|
-
phoneNumber: userRecord.phoneNumber || undefined,
|
|
166
|
-
phoneVerifiedAt: userRecord.phoneVerifiedAt || undefined,
|
|
167
|
-
maskedPhoneNumber,
|
|
168
|
-
phoneVerificationSentAt: userRecord.phoneVerificationSentAt || undefined,
|
|
169
|
-
canResendInSeconds,
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
async completeFacebookSignUp(input) {
|
|
173
|
-
this.logger.log('[AUTH_RESOLVER] ===== COMPLETE FACEBOOK SIGN-UP =====');
|
|
174
|
-
this.logger.log(`[AUTH_RESOLVER] Email: ${input.email}`);
|
|
175
|
-
const result = await this.authService.completeFacebookSignUp(input.fallbackToken, input.email, input.accessToken);
|
|
176
|
-
this.logger.log(`[AUTH_RESOLVER] Successfully completed Facebook sign-up for user: ${result.user.id}`);
|
|
177
|
-
this.logger.log(`[AUTH_RESOLVER] NOTE: Email verification required before app access`);
|
|
178
|
-
return {
|
|
179
|
-
...result,
|
|
180
|
-
user: auth_user_entity_1.AuthUser.fromInterface(result.user),
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
async unlinkSocialAccount(input, user) {
|
|
184
|
-
this.logger.log(`[AUTH_RESOLVER] Unlink ${input.provider} account for user: ${user.id}`);
|
|
185
|
-
const result = await this.authService.unlinkSocialAccount(user.id, input.provider);
|
|
186
|
-
this.logger.log(`[AUTH_RESOLVER] Successfully unlinked ${input.provider} account for user: ${user.id}`);
|
|
187
|
-
return {
|
|
188
|
-
...result,
|
|
189
|
-
user: auth_user_entity_1.AuthUser.fromInterface(result.user),
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
async enableBiometric(input, user) {
|
|
193
|
-
this.logger.log(`[AUTH_RESOLVER] Enable biometric for user: ${user.id} on device: ${input.deviceId}`);
|
|
194
|
-
const result = await this.biometricAuthService.enableBiometric(user.id, input.deviceId, input.publicKey);
|
|
195
|
-
this.logger.log(`[AUTH_RESOLVER] Successfully enabled biometric for user: ${user.id}`);
|
|
196
|
-
return result;
|
|
197
|
-
}
|
|
198
|
-
async disableBiometric(user) {
|
|
199
|
-
this.logger.log(`[AUTH_RESOLVER] Disable biometric for user: ${user.id}`);
|
|
200
|
-
const result = await this.biometricAuthService.disableBiometric(user.id);
|
|
201
|
-
this.logger.log(`[AUTH_RESOLVER] Successfully disabled biometric for user: ${user.id}`);
|
|
202
|
-
return result;
|
|
203
|
-
}
|
|
204
|
-
async biometricLogin(input) {
|
|
205
|
-
this.logger.log(`[AUTH_RESOLVER] Biometric login attempt for user: ${input.userId}`);
|
|
206
|
-
const result = await this.biometricAuthService.authenticateWithBiometric(input.userId, input.deviceId);
|
|
207
|
-
this.logger.log(`[AUTH_RESOLVER] Successfully authenticated user via biometric: ${input.userId}`);
|
|
208
|
-
const user = await this.userRepository.findById(input.userId);
|
|
209
|
-
if (!user) {
|
|
210
|
-
throw new common_1.UnauthorizedException('User not found');
|
|
211
|
-
}
|
|
212
|
-
return {
|
|
213
|
-
accessToken: result.accessToken,
|
|
214
|
-
refreshToken: result.refreshToken,
|
|
215
|
-
user: auth_user_entity_1.AuthUser.fromInterface(user),
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
async biometricStatus(user) {
|
|
219
|
-
const status = await this.biometricAuthService.getBiometricStatus(user.id);
|
|
220
|
-
return {
|
|
221
|
-
enabled: status.enabled,
|
|
222
|
-
deviceId: status.deviceId || undefined,
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
async enrollBiometric(input, user) {
|
|
226
|
-
this.logger.log(`[AUTH_RESOLVER] Enroll biometric for user: ${user.id} device: ${input.deviceId}`);
|
|
227
|
-
throw new Error('enrollBiometric not implemented - requires IBiometricRepository implementation. See README.md');
|
|
228
|
-
}
|
|
229
|
-
async requestBiometricChallenge(deviceId, user) {
|
|
230
|
-
this.logger.log(`[AUTH_RESOLVER] Request biometric challenge for user: ${user.id} device: ${deviceId}`);
|
|
231
|
-
throw new Error('requestBiometricChallenge not implemented - requires IBiometricRepository implementation. See README.md');
|
|
232
|
-
}
|
|
233
|
-
async verifyBiometricSignature(input) {
|
|
234
|
-
this.logger.log(`[AUTH_RESOLVER] Verify biometric signature for challenge: ${input.challengeId}`);
|
|
235
|
-
throw new Error('verifyBiometricSignature not implemented - requires IBiometricRepository implementation. See README.md');
|
|
236
|
-
}
|
|
237
|
-
async removeBiometricDevice(deviceId, user) {
|
|
238
|
-
this.logger.log(`[AUTH_RESOLVER] Remove biometric device ${deviceId} for user: ${user.id}`);
|
|
239
|
-
throw new Error('removeBiometricDevice not implemented - requires IBiometricRepository implementation. See README.md');
|
|
240
|
-
}
|
|
241
|
-
async biometricDevices(user) {
|
|
242
|
-
throw new Error('biometricDevices not implemented - requires IBiometricRepository implementation. See README.md');
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
exports.AuthResolver = AuthResolver;
|
|
246
|
-
__decorate([
|
|
247
|
-
(0, graphql_1.Mutation)(() => AuthResponse),
|
|
248
|
-
(0, throttler_1.Throttle)({ default: { limit: 5, ttl: 60000 } }),
|
|
249
|
-
__param(0, (0, graphql_1.Args)('input')),
|
|
250
|
-
__metadata("design:type", Function),
|
|
251
|
-
__metadata("design:paramtypes", [signup_input_1.AuthSignupInput]),
|
|
252
|
-
__metadata("design:returntype", Promise)
|
|
253
|
-
], AuthResolver.prototype, "signup", null);
|
|
254
|
-
__decorate([
|
|
255
|
-
(0, graphql_1.Mutation)(() => AuthResponse),
|
|
256
|
-
(0, throttler_1.Throttle)({ default: { limit: 5, ttl: 60000 } }),
|
|
257
|
-
__param(0, (0, graphql_1.Args)('input')),
|
|
258
|
-
__param(1, (0, graphql_1.Context)()),
|
|
259
|
-
__metadata("design:type", Function),
|
|
260
|
-
__metadata("design:paramtypes", [login_input_1.AuthLoginInput, Object]),
|
|
261
|
-
__metadata("design:returntype", Promise)
|
|
262
|
-
], AuthResolver.prototype, "login", null);
|
|
263
|
-
__decorate([
|
|
264
|
-
(0, graphql_1.Mutation)(() => AuthResponse),
|
|
265
|
-
(0, throttler_1.Throttle)({ default: { limit: 10, ttl: 60000 } }),
|
|
266
|
-
__param(0, (0, graphql_1.Args)('input')),
|
|
267
|
-
__metadata("design:type", Function),
|
|
268
|
-
__metadata("design:paramtypes", [refresh_token_input_1.AuthRefreshTokenInput]),
|
|
269
|
-
__metadata("design:returntype", Promise)
|
|
270
|
-
], AuthResolver.prototype, "refreshToken", null);
|
|
271
|
-
__decorate([
|
|
272
|
-
(0, graphql_1.Mutation)(() => logout_response_dto_1.AuthLogoutResponse),
|
|
273
|
-
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
274
|
-
(0, throttler_1.Throttle)({ default: { limit: 10, ttl: 60000 } }),
|
|
275
|
-
__param(0, (0, graphql_1.Args)('input')),
|
|
276
|
-
__param(1, (0, current_user_decorator_1.CurrentUser)()),
|
|
277
|
-
__metadata("design:type", Function),
|
|
278
|
-
__metadata("design:paramtypes", [logout_input_1.AuthLogoutInput, Object]),
|
|
279
|
-
__metadata("design:returntype", Promise)
|
|
280
|
-
], AuthResolver.prototype, "logout", null);
|
|
281
|
-
__decorate([
|
|
282
|
-
(0, graphql_1.Mutation)(() => logout_response_dto_1.AuthLogoutAllResponse),
|
|
283
|
-
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
284
|
-
(0, throttler_1.Throttle)({ default: { limit: 5, ttl: 60000 } }),
|
|
285
|
-
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
286
|
-
__metadata("design:type", Function),
|
|
287
|
-
__metadata("design:paramtypes", [Object]),
|
|
288
|
-
__metadata("design:returntype", Promise)
|
|
289
|
-
], AuthResolver.prototype, "logoutAll", null);
|
|
290
|
-
__decorate([
|
|
291
|
-
(0, graphql_1.Query)(() => account_lock_status_dto_1.AuthAccountLockStatus),
|
|
292
|
-
(0, throttler_1.Throttle)({ default: { limit: 20, ttl: 60000 } }),
|
|
293
|
-
__param(0, (0, graphql_1.Args)('email')),
|
|
294
|
-
__metadata("design:type", Function),
|
|
295
|
-
__metadata("design:paramtypes", [String]),
|
|
296
|
-
__metadata("design:returntype", Promise)
|
|
297
|
-
], AuthResolver.prototype, "checkAuthAccountLockStatus", null);
|
|
298
|
-
__decorate([
|
|
299
|
-
(0, graphql_1.Mutation)(() => verify_email_response_dto_1.AuthVerifyEmailResponse),
|
|
300
|
-
(0, throttler_1.Throttle)({ default: { limit: 10, ttl: 60000 } }),
|
|
301
|
-
__param(0, (0, graphql_1.Args)('input')),
|
|
302
|
-
__metadata("design:type", Function),
|
|
303
|
-
__metadata("design:paramtypes", [verify_email_input_1.AuthVerifyEmailInput]),
|
|
304
|
-
__metadata("design:returntype", Promise)
|
|
305
|
-
], AuthResolver.prototype, "verifyEmail", null);
|
|
306
|
-
__decorate([
|
|
307
|
-
(0, graphql_1.Mutation)(() => verify_email_response_dto_1.AuthVerifyEmailResponse),
|
|
308
|
-
(0, throttler_1.Throttle)({ default: { limit: 3, ttl: 60000 } }),
|
|
309
|
-
__param(0, (0, graphql_1.Args)('email')),
|
|
310
|
-
__metadata("design:type", Function),
|
|
311
|
-
__metadata("design:paramtypes", [String]),
|
|
312
|
-
__metadata("design:returntype", Promise)
|
|
313
|
-
], AuthResolver.prototype, "resendVerificationEmail", null);
|
|
314
|
-
__decorate([
|
|
315
|
-
(0, graphql_1.Mutation)(() => phone_verification_response_dto_1.AuthPhoneVerificationResponse),
|
|
316
|
-
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
317
|
-
(0, throttler_1.Throttle)({ default: { limit: 3, ttl: 60000 } }),
|
|
318
|
-
__param(0, (0, graphql_1.Args)('input')),
|
|
319
|
-
__param(1, (0, current_user_decorator_1.CurrentUser)()),
|
|
320
|
-
__metadata("design:type", Function),
|
|
321
|
-
__metadata("design:paramtypes", [send_phone_verification_input_1.AuthSendPhoneVerificationInput, Object]),
|
|
322
|
-
__metadata("design:returntype", Promise)
|
|
323
|
-
], AuthResolver.prototype, "sendPhoneVerification", null);
|
|
324
|
-
__decorate([
|
|
325
|
-
(0, graphql_1.Mutation)(() => phone_verification_response_dto_1.AuthVerifyPhoneResponse),
|
|
326
|
-
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
327
|
-
(0, throttler_1.Throttle)({ default: { limit: 10, ttl: 60000 } }),
|
|
328
|
-
__param(0, (0, graphql_1.Args)('input')),
|
|
329
|
-
__param(1, (0, current_user_decorator_1.CurrentUser)()),
|
|
330
|
-
__metadata("design:type", Function),
|
|
331
|
-
__metadata("design:paramtypes", [verify_phone_input_1.AuthVerifyPhoneInput, Object]),
|
|
332
|
-
__metadata("design:returntype", Promise)
|
|
333
|
-
], AuthResolver.prototype, "verifyPhone", null);
|
|
334
|
-
__decorate([
|
|
335
|
-
(0, graphql_1.Mutation)(() => phone_verification_response_dto_1.AuthPhoneVerificationResponse),
|
|
336
|
-
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
337
|
-
(0, throttler_1.Throttle)({ default: { limit: 3, ttl: 60000 } }),
|
|
338
|
-
__param(0, (0, graphql_1.Args)('phoneNumber')),
|
|
339
|
-
__param(1, (0, current_user_decorator_1.CurrentUser)()),
|
|
340
|
-
__metadata("design:type", Function),
|
|
341
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
342
|
-
__metadata("design:returntype", Promise)
|
|
343
|
-
], AuthResolver.prototype, "resendPhoneVerification", null);
|
|
344
|
-
__decorate([
|
|
345
|
-
(0, graphql_1.Mutation)(() => phone_verification_response_dto_1.AuthRemovePhoneResponse),
|
|
346
|
-
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
347
|
-
(0, throttler_1.Throttle)({ default: { limit: 5, ttl: 60000 } }),
|
|
348
|
-
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
349
|
-
__metadata("design:type", Function),
|
|
350
|
-
__metadata("design:paramtypes", [Object]),
|
|
351
|
-
__metadata("design:returntype", Promise)
|
|
352
|
-
], AuthResolver.prototype, "removePhoneNumber", null);
|
|
353
|
-
__decorate([
|
|
354
|
-
(0, graphql_1.Query)(() => phone_verification_status_dto_1.AuthPhoneVerificationStatus),
|
|
355
|
-
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
356
|
-
(0, throttler_1.Throttle)({ default: { limit: 20, ttl: 60000 } }),
|
|
357
|
-
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
358
|
-
__metadata("design:type", Function),
|
|
359
|
-
__metadata("design:paramtypes", [Object]),
|
|
360
|
-
__metadata("design:returntype", Promise)
|
|
361
|
-
], AuthResolver.prototype, "phoneVerificationStatus", null);
|
|
362
|
-
__decorate([
|
|
363
|
-
(0, graphql_1.Mutation)(() => AuthResponse),
|
|
364
|
-
(0, throttler_1.Throttle)({ default: { limit: 10, ttl: 900000 } }),
|
|
365
|
-
__param(0, (0, graphql_1.Args)('input')),
|
|
366
|
-
__metadata("design:type", Function),
|
|
367
|
-
__metadata("design:paramtypes", [complete_facebook_signup_input_1.AuthCompleteFacebookSignUpInput]),
|
|
368
|
-
__metadata("design:returntype", Promise)
|
|
369
|
-
], AuthResolver.prototype, "completeFacebookSignUp", null);
|
|
370
|
-
__decorate([
|
|
371
|
-
(0, graphql_1.Mutation)(() => unlink_social_account_response_dto_1.AuthUnlinkSocialAccountResponse),
|
|
372
|
-
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
373
|
-
(0, throttler_1.Throttle)({ default: { limit: 5, ttl: 60000 } }),
|
|
374
|
-
__param(0, (0, graphql_1.Args)('input')),
|
|
375
|
-
__param(1, (0, current_user_decorator_1.CurrentUser)()),
|
|
376
|
-
__metadata("design:type", Function),
|
|
377
|
-
__metadata("design:paramtypes", [unlink_social_account_input_1.AuthUnlinkSocialAccountInput, Object]),
|
|
378
|
-
__metadata("design:returntype", Promise)
|
|
379
|
-
], AuthResolver.prototype, "unlinkSocialAccount", null);
|
|
380
|
-
__decorate([
|
|
381
|
-
(0, graphql_1.Mutation)(() => Boolean),
|
|
382
|
-
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
383
|
-
(0, throttler_1.Throttle)({ default: { limit: 5, ttl: 60000 } }),
|
|
384
|
-
__param(0, (0, graphql_1.Args)('input')),
|
|
385
|
-
__param(1, (0, current_user_decorator_1.CurrentUser)()),
|
|
386
|
-
__metadata("design:type", Function),
|
|
387
|
-
__metadata("design:paramtypes", [enable_biometric_input_1.AuthEnableBiometricInput, Object]),
|
|
388
|
-
__metadata("design:returntype", Promise)
|
|
389
|
-
], AuthResolver.prototype, "enableBiometric", null);
|
|
390
|
-
__decorate([
|
|
391
|
-
(0, graphql_1.Mutation)(() => Boolean),
|
|
392
|
-
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
393
|
-
(0, throttler_1.Throttle)({ default: { limit: 5, ttl: 60000 } }),
|
|
394
|
-
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
395
|
-
__metadata("design:type", Function),
|
|
396
|
-
__metadata("design:paramtypes", [Object]),
|
|
397
|
-
__metadata("design:returntype", Promise)
|
|
398
|
-
], AuthResolver.prototype, "disableBiometric", null);
|
|
399
|
-
__decorate([
|
|
400
|
-
(0, graphql_1.Mutation)(() => AuthResponse),
|
|
401
|
-
(0, throttler_1.Throttle)({ default: { limit: 10, ttl: 60000 } }),
|
|
402
|
-
__param(0, (0, graphql_1.Args)('input')),
|
|
403
|
-
__metadata("design:type", Function),
|
|
404
|
-
__metadata("design:paramtypes", [biometric_login_input_1.AuthBiometricLoginInput]),
|
|
405
|
-
__metadata("design:returntype", Promise)
|
|
406
|
-
], AuthResolver.prototype, "biometricLogin", null);
|
|
407
|
-
__decorate([
|
|
408
|
-
(0, graphql_1.Query)(() => biometric_status_dto_1.AuthBiometricStatusResponse),
|
|
409
|
-
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
410
|
-
(0, throttler_1.Throttle)({ default: { limit: 20, ttl: 60000 } }),
|
|
411
|
-
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
412
|
-
__metadata("design:type", Function),
|
|
413
|
-
__metadata("design:paramtypes", [Object]),
|
|
414
|
-
__metadata("design:returntype", Promise)
|
|
415
|
-
], AuthResolver.prototype, "biometricStatus", null);
|
|
416
|
-
__decorate([
|
|
417
|
-
(0, graphql_1.Mutation)(() => biometric_credential_dto_1.BiometricCredentialDto),
|
|
418
|
-
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
419
|
-
(0, throttler_1.Throttle)({ default: { limit: 5, ttl: 60000 } }),
|
|
420
|
-
__param(0, (0, graphql_1.Args)('input')),
|
|
421
|
-
__param(1, (0, current_user_decorator_1.CurrentUser)()),
|
|
422
|
-
__metadata("design:type", Function),
|
|
423
|
-
__metadata("design:paramtypes", [enroll_biometric_input_1.EnrollBiometricInput, Object]),
|
|
424
|
-
__metadata("design:returntype", Promise)
|
|
425
|
-
], AuthResolver.prototype, "enrollBiometric", null);
|
|
426
|
-
__decorate([
|
|
427
|
-
(0, graphql_1.Mutation)(() => biometric_challenge_dto_1.BiometricChallengeDto),
|
|
428
|
-
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
429
|
-
(0, throttler_1.Throttle)({ default: { limit: 10, ttl: 60000 } }),
|
|
430
|
-
__param(0, (0, graphql_1.Args)('deviceId')),
|
|
431
|
-
__param(1, (0, current_user_decorator_1.CurrentUser)()),
|
|
432
|
-
__metadata("design:type", Function),
|
|
433
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
434
|
-
__metadata("design:returntype", Promise)
|
|
435
|
-
], AuthResolver.prototype, "requestBiometricChallenge", null);
|
|
436
|
-
__decorate([
|
|
437
|
-
(0, graphql_1.Mutation)(() => AuthResponse),
|
|
438
|
-
(0, throttler_1.Throttle)({ default: { limit: 10, ttl: 60000 } }),
|
|
439
|
-
__param(0, (0, graphql_1.Args)('input')),
|
|
440
|
-
__metadata("design:type", Function),
|
|
441
|
-
__metadata("design:paramtypes", [verify_biometric_signature_input_1.VerifyBiometricSignatureInput]),
|
|
442
|
-
__metadata("design:returntype", Promise)
|
|
443
|
-
], AuthResolver.prototype, "verifyBiometricSignature", null);
|
|
444
|
-
__decorate([
|
|
445
|
-
(0, graphql_1.Mutation)(() => remove_biometric_device_response_dto_1.RemoveBiometricDeviceResponse),
|
|
446
|
-
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
447
|
-
(0, throttler_1.Throttle)({ default: { limit: 5, ttl: 60000 } }),
|
|
448
|
-
__param(0, (0, graphql_1.Args)('deviceId')),
|
|
449
|
-
__param(1, (0, current_user_decorator_1.CurrentUser)()),
|
|
450
|
-
__metadata("design:type", Function),
|
|
451
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
452
|
-
__metadata("design:returntype", Promise)
|
|
453
|
-
], AuthResolver.prototype, "removeBiometricDevice", null);
|
|
454
|
-
__decorate([
|
|
455
|
-
(0, graphql_1.Query)(() => [biometric_credential_dto_1.BiometricCredentialDto]),
|
|
456
|
-
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
457
|
-
(0, throttler_1.Throttle)({ default: { limit: 20, ttl: 60000 } }),
|
|
458
|
-
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
459
|
-
__metadata("design:type", Function),
|
|
460
|
-
__metadata("design:paramtypes", [Object]),
|
|
461
|
-
__metadata("design:returntype", Promise)
|
|
462
|
-
], AuthResolver.prototype, "biometricDevices", null);
|
|
463
|
-
exports.AuthResolver = AuthResolver = AuthResolver_1 = __decorate([
|
|
464
|
-
(0, graphql_1.Resolver)(),
|
|
465
|
-
__param(5, (0, common_1.Inject)('USER_REPOSITORY')),
|
|
466
|
-
__metadata("design:paramtypes", [auth_service_1.AuthService,
|
|
467
|
-
brute_force_protection_service_1.BruteForceProtectionService,
|
|
468
|
-
oauth_linking_token_service_1.OAuthLinkingTokenService,
|
|
469
|
-
biometric_auth_service_1.BiometricAuthService,
|
|
470
|
-
biometric_verification_service_1.BiometricVerificationService, Object])
|
|
471
|
-
], AuthResolver);
|
|
472
|
-
//# sourceMappingURL=auth.resolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.resolver.js","sourceRoot":"","sources":["../../src/resolvers/auth.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2E;AAC3E,2CAAqG;AACrG,iDAA6C;AAC7C,6CAAoD;AACpD,2DAAuD;AACvD,6DAAwD;AACxD,iFAAmE;AAEnE,mEAAwD;AAIxD,IAAM,YAAY,GAAlB,MAAM,YAAY;CASjB,CAAA;AAPC;IADC,IAAA,eAAK,GAAE;;iDACY;AAGpB;IADC,IAAA,eAAK,GAAE;;kDACa;AAGrB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,2BAAQ,CAAC;8BAChB,2BAAQ;0CAAC;AARX,YAAY;IADjB,IAAA,oBAAU,GAAE;GACP,YAAY,CASjB;AACD,sDAAsD;AACtD,oDAAoD;AACpD,oEAAmE;AACnE,s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AE,CAAC;IAE9C,WAAA,IAAA,cAAI,EAAC,OAAO,CAAC,CAAA;;qCAAQ,gEAA6B;;4DAUpD;AAoBK;IAHL,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,oEAA6B,CAAC;IAC7C,IAAA,kBAAS,EAAC,6BAAY,CAAC;IACvB,IAAA,oBAAQ,EAAC,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC;IAE7C,WAAA,IAAA,cAAI,EAAC,UAAU,CAAC,CAAA;IAChB,WAAA,IAAA,oCAAW,GAAE,CAAA;;;;yDAUf;AAiBK;IAHL,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,iDAAsB,CAAC,CAAC;IACrC,IAAA,kBAAS,EAAC,6BAAY,CAAC;IACvB,IAAA,oBAAQ,EAAC,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC;IAE9C,WAAA,IAAA,oCAAW,GAAE,CAAA;;;;oDAMf;uBAzmBU,YAAY;IADxB,IAAA,kBAAQ,GAAE;IAYN,WAAA,IAAA,eAAM,EAAC,iBAAiB,CAAC,CAAA;qCAPL,0BAAW;QACF,4DAA2B;QAEvB,sDAAwB;QAC5B,6CAAoB;QAEZ,6DAA4B;GAVzD,YAAY,CA0mBxB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface PassportInstanceInfo {
|
|
2
|
-
instanceId: string;
|
|
3
|
-
modulePath: string;
|
|
4
|
-
registeredStrategies: string[];
|
|
5
|
-
timestamp: string;
|
|
6
|
-
inspectionPoint: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function inspectPassportInstance(passportInstance: any, inspectionPoint: string): PassportInstanceInfo;
|
|
9
|
-
export declare function logPassportInstanceInfo(info: PassportInstanceInfo): void;
|
|
10
|
-
export declare function arePassportInstancesDifferent(info1: PassportInstanceInfo, info2: PassportInstanceInfo): boolean;
|
|
11
|
-
//# sourceMappingURL=passport-inspector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"passport-inspector.d.ts","sourceRoot":"","sources":["../../src/utils/passport-inspector.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,oBAAoB;IAEnC,UAAU,EAAE,MAAM,CAAC;IAEnB,UAAU,EAAE,MAAM,CAAC;IAEnB,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAE/B,SAAS,EAAE,MAAM,CAAC;IAElB,eAAe,EAAE,MAAM,CAAC;CACzB;AASD,wBAAgB,uBAAuB,CACrC,gBAAgB,EAAE,GAAG,EACrB,eAAe,EAAE,MAAM,GACtB,oBAAoB,CAsBtB;AAOD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAOxE;AASD,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,oBAAoB,EAC3B,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAiBT"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.inspectPassportInstance = inspectPassportInstance;
|
|
4
|
-
exports.logPassportInstanceInfo = logPassportInstanceInfo;
|
|
5
|
-
exports.arePassportInstancesDifferent = arePassportInstancesDifferent;
|
|
6
|
-
function inspectPassportInstance(passportInstance, inspectionPoint) {
|
|
7
|
-
const instanceId = Object.prototype.toString.call(passportInstance);
|
|
8
|
-
let modulePath;
|
|
9
|
-
try {
|
|
10
|
-
modulePath = require.resolve('passport');
|
|
11
|
-
}
|
|
12
|
-
catch (error) {
|
|
13
|
-
modulePath = 'UNKNOWN - require.resolve failed';
|
|
14
|
-
}
|
|
15
|
-
const registeredStrategies = Object.keys(passportInstance._strategies || {});
|
|
16
|
-
return {
|
|
17
|
-
instanceId,
|
|
18
|
-
modulePath,
|
|
19
|
-
registeredStrategies,
|
|
20
|
-
timestamp: new Date().toISOString(),
|
|
21
|
-
inspectionPoint,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
function logPassportInstanceInfo(info) {
|
|
25
|
-
console.log(`[PASSPORT-DEBUG:${info.inspectionPoint}] Passport Instance Inspection:`);
|
|
26
|
-
console.log(` Timestamp: ${info.timestamp}`);
|
|
27
|
-
console.log(` Instance ID: ${info.instanceId}`);
|
|
28
|
-
console.log(` Module Path: ${info.modulePath}`);
|
|
29
|
-
console.log(` Registered Strategies: [${info.registeredStrategies.join(', ')}]`);
|
|
30
|
-
console.log(` Strategy Count: ${info.registeredStrategies.length}`);
|
|
31
|
-
}
|
|
32
|
-
function arePassportInstancesDifferent(info1, info2) {
|
|
33
|
-
const differentModule = info1.modulePath !== info2.modulePath;
|
|
34
|
-
const differentInstance = info1.instanceId !== info2.instanceId;
|
|
35
|
-
if (differentModule || differentInstance) {
|
|
36
|
-
console.log('[PASSPORT-DEBUG:Comparison] MULTIPLE PASSPORT INSTANCES DETECTED!');
|
|
37
|
-
console.log(` ${info1.inspectionPoint}:`);
|
|
38
|
-
console.log(` Module: ${info1.modulePath}`);
|
|
39
|
-
console.log(` Instance: ${info1.instanceId}`);
|
|
40
|
-
console.log(` ${info2.inspectionPoint}:`);
|
|
41
|
-
console.log(` Module: ${info2.modulePath}`);
|
|
42
|
-
console.log(` Instance: ${info2.instanceId}`);
|
|
43
|
-
return true;
|
|
44
|
-
}
|
|
45
|
-
console.log('[PASSPORT-DEBUG:Comparison] Same Passport instance confirmed');
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=passport-inspector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"passport-inspector.js","sourceRoot":"","sources":["../../src/utils/passport-inspector.ts"],"names":[],"mappings":";;AA4BA,0DAyBC;AAOD,0DAOC;AASD,sEAoBC;AApED,SAAgB,uBAAuB,CACrC,gBAAqB,EACrB,eAAuB;IAGvB,MAAM,UAAU,GAAG,M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