You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/rockets-server/README.md
+77-47Lines changed: 77 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,9 +72,13 @@ maintaining flexibility for customization and extension.
72
72
### Installation
73
73
74
74
**⚠️ CRITICAL: Alpha Version Issue**:
75
-
> **The current alpha version (7.0.0-alpha.4) has a dependency injection issue with AuthJwtGuard that prevents the minimal setup from working. This is a known issue being investigated.**
75
+
76
+
> **The current alpha version (7.0.0-alpha.4) has a dependency injection
77
+
> issue with AuthJwtGuard that prevents the minimal setup from working. This
78
+
> is a known issue being investigated.**
76
79
77
80
**Version Requirements**:
81
+
78
82
- NestJS: `^10.0.0`
79
83
- Node.js: `>=18.0.0`
80
84
- TypeScript: `>=4.8.0`
@@ -85,11 +89,12 @@ Let's create a new NestJS project:
85
89
npx @nestjs/cli@10 new my-app-with-rockets --package-manager yarn --language TypeScript --strict
86
90
```
87
91
88
-
89
92
Install the Rockets SDK and all required dependencies:
**Database Support**: Choose your database driver:
@@ -105,7 +110,6 @@ yarn add pg
105
110
yarn add mysql2
106
111
```
107
112
108
-
109
113
---
110
114
111
115
## Tutorial
@@ -374,7 +378,8 @@ Expected response (200 OK):
374
378
**Note**: The login endpoint returns a 200 OK status (not 201 Created) as it's retrieving
375
379
tokens, not creating a new resource.
376
380
377
-
**Defaults Working**: All authentication endpoints work out-of-the-box with sensible defaults.
381
+
**Defaults Working**: All authentication endpoints work out-of-the-box with
382
+
sensible defaults.
378
383
379
384
#### 4. Access Protected Endpoint
380
385
@@ -438,30 +443,37 @@ you restart the application. This is perfect for testing and development!
438
443
439
444
#### Common Issues
440
445
441
-
**AuthJwtGuard Dependency Error**
446
+
#### AuthJwtGuard Dependency Error
442
447
443
448
If you encounter this error:
444
-
```
445
-
Nest can't resolve dependencies of the AuthJwtGuard (AUTHENTICATION_MODULE_SETTINGS_TOKEN, ?). Please make sure that the argument Reflector at index [1] is available in the AuthJwtModule context.
449
+
450
+
```text
451
+
Nest can't resolve dependencies of the AuthJwtGuard
452
+
(AUTHENTICATION_MODULE_SETTINGS_TOKEN, ?). Please make sure that the
453
+
argument Reflector at index [1] is available in the AuthJwtModule context.
446
454
```
447
455
448
-
****Solution: Version Compatibility Issues**
456
+
#### Module Resolution Errors
449
457
450
458
If you're getting dependency resolution errors:
451
459
452
460
1.**NestJS Version**: Ensure you're using NestJS `^10.0.0`
453
-
2.**Alpha Packages**: All `@concepta/*` packages should use the same alpha version (e.g., `^7.0.0-alpha.4`)
454
-
3.**Clean Installation**: Try deleting `node_modules` and `package-lock.json`, then run `yarn install`
461
+
2.**Alpha Packages**: All `@concepta/*` packages should use the same alpha
462
+
version (e.g., `^7.0.0-alpha.4`)
463
+
3.**Clean Installation**: Try deleting `node_modules` and `package-lock.json`,
464
+
then run `yarn install`
455
465
456
-
**Module Resolution Errors**
466
+
#### Module Resolution Errors (TypeScript)
457
467
458
468
If TypeScript can't find modules like `@concepta/nestjs-typeorm-ext`:
**Note**: Environment variables are automatically used for secrets and expiration times. Only customize `jwt.settings` if you need specific JWT options like issuer/audience, you can also use the environment variables to configure the JWT module.
662
-
```
681
+
682
+
**Note**: Environment variables are automatically used for secrets and
683
+
expiration times. Only customize `jwt.settings` if you need specific JWT
684
+
options like issuer/audience, you can also use the environment variables to
685
+
configure the JWT module.
663
686
664
687
---
665
688
@@ -696,9 +719,9 @@ authJwt: {
696
719
userModelService: newCustomUserLookupService(),
697
720
}
698
721
```
699
-
```
700
-
**Note**: Default token extraction uses standard Bearer token from Authorization header. Only customize if you need alternative token sources.
701
-
```
722
+
723
+
**Note**: Default token extraction uses standard Bearer token from
724
+
Authorization header. Only customize if you need alternative token sources.
702
725
703
726
---
704
727
@@ -728,13 +751,13 @@ authLocal: {
728
751
}
729
752
```
730
753
731
-
```
732
754
**Environment Variables**:
755
+
733
756
-`AUTH_LOCAL_USERNAME_FIELD` - defaults to `'username'`
734
757
-`AUTH_LOCAL_PASSWORD_FIELD` - defaults to `'password'`
735
758
736
-
**Note**: The default services work automatically with your TypeORM User entity. Only customize if you need specific validation logic.
737
-
```
759
+
**Note**: The default services work automatically with your TypeORM User entity.
760
+
Only customize if you need specific validation logic.
738
761
739
762
---
740
763
@@ -882,13 +905,14 @@ password: {
882
905
```
883
906
884
907
**Environment Variables**:
885
-
-`PASSWORD_MIN_PASSWORD_STRENGTH` - defaults to `4` if production, `0` if development (0-4 scale)
908
+
909
+
-`PASSWORD_MIN_PASSWORD_STRENGTH` - defaults to `4` if production, `0` if
910
+
development (0-4 scale)
886
911
-`PASSWORD_MAX_PASSWORD_ATTEMPTS` - defaults to `3`
887
912
-`PASSWORD_REQUIRE_CURRENT_TO_UPDATE` - defaults to `false`
888
913
889
-
```
890
-
**Note**: Password strength is automatically calculated using zxcvbn. History tracking is optional and requires additional configuration.
891
-
```
914
+
**Note**: Password strength is automatically calculated using zxcvbn. History
915
+
tracking is optional and requires additional configuration.
0 commit comments