@nest-boot/auth 7.2.0 → 7.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,7 @@ import { RouteInfo, Type } from "@nestjs/common/interfaces";
2
2
  import { BetterAuthOptions } from "better-auth";
3
3
  import { MikroOrmAdapterConfig } from "./adapters/mikro-orm-adapter";
4
4
  export interface AuthModuleMiddlewareOptions {
5
+ register?: boolean;
5
6
  includeRoutes?: (string | RouteInfo | Type)[];
6
7
  excludeRoutes?: (string | RouteInfo)[];
7
8
  }
@@ -24,33 +24,38 @@ let AuthMiddleware = class AuthMiddleware {
24
24
  this.em = em;
25
25
  }
26
26
  async getSession(req) {
27
- const headers = new Headers();
28
- Object.entries(req.headers).forEach(([key, value]) => {
29
- if (value) {
30
- if (Array.isArray(value)) {
31
- value.forEach((v) => {
32
- headers.append(key, v);
33
- });
34
- }
35
- else {
36
- headers.set(key, value);
37
- }
38
- }
39
- });
40
27
  return await this.authService.auth.api.getSession({
41
- headers,
28
+ headers: Object.entries(req.headers).reduce((headers, [key, value]) => {
29
+ if (value) {
30
+ if (Array.isArray(value)) {
31
+ for (const item of value) {
32
+ headers.append(key, item);
33
+ }
34
+ }
35
+ else {
36
+ headers.append(key, value);
37
+ }
38
+ }
39
+ return headers;
40
+ }, new Headers()),
42
41
  });
43
42
  }
44
43
  async use(req, res, next) {
45
44
  const data = await this.getSession(req);
46
- if (data) {
47
- res.locals.user = await this.em.findOne(this.options.entities.user, {
45
+ if (!data) {
46
+ next();
47
+ return;
48
+ }
49
+ const [user, session] = await Promise.all([
50
+ this.em.findOne(this.options.entities.user, {
48
51
  id: data.user.id,
49
- });
50
- res.locals.session = await this.em.findOne(this.options.entities.session, {
52
+ }),
53
+ this.em.findOne(this.options.entities.session, {
51
54
  token: data.session.token,
52
- });
53
- }
55
+ }),
56
+ ]);
57
+ res.locals.user = user;
58
+ res.locals.session = session;
54
59
  next();
55
60
  }
56
61
  };
@@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B,CAAC,CAAA;6CAEC,0BAAW;QACpB,oBAAa;GALzB,cAAc,CA8C1B"}
@@ -1,4 +1,2 @@
1
1
  import { type AuthModuleOptions } from "./auth-module-options.interface";
2
- export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<AuthModuleOptions, "register", "create", {
3
- isGlobal: boolean;
4
- }>, MODULE_OPTIONS_TOKEN: string | symbol;
2
+ export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<AuthModuleOptions, "forRoot", "create", {}>, MODULE_OPTIONS_TOKEN: string | symbol;
@@ -4,11 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.MODULE_OPTIONS_TOKEN = exports.ConfigurableModuleClass = void 0;
5
5
  const common_1 = require("@nestjs/common");
6
6
  _a = new common_1.ConfigurableModuleBuilder()
7
- .setExtras({
8
- isGlobal: false,
9
- }, (definition, extras) => ({
10
- ...definition,
11
- global: extras.isGlobal,
12
- }))
7
+ .setClassMethodName("forRoot")
13
8
  .build(), exports.ConfigurableModuleClass = _a.ConfigurableModuleClass, exports.MODULE_OPTIONS_TOKEN = _a.MODULE_OPTIONS_TOKEN;
14
9
  //# sourceMappingURL=auth.module-definition.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth.module-definition.js","sourceRoot":"","sources":["../src/auth.module-definition.ts"],"names":[],"mappings":";;;;AAAA,2CAA2D;AAI9C,KACX,IAAI,kCAAyB,EAAqB;KAC/C,SAAS,CACR;IACE,QAAQ,EAAE,KAAK;CAChB,EACD,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;IACvB,GAAG,UAAU;IACb,MAAM,EAAE,MAAM,CAAC,QAAQ;CACxB,CAAC,CACH;KACA,KAAK,EAAE,EAXG,+BAAuB,+BAAE,4BAAoB,2BAW/C"}
1
+ {"version":3,"file":"auth.module-definition.js","sourceRoot":"","sources":["../src/auth.module-definition.ts"],"names":[],"mappings":";;;;AAAA,2CAA2D;AAI9C,KACX,IAAI,kCAAyB,EAAqB;KAC/C,kBAAkB,CAAC,SAAS,CAAC;KAC7B,KAAK,EAAE,EAHG,+BAAuB,+BAAE,4BAAoB,2BAG/C"}
@@ -1,13 +1,10 @@
1
- import { MiddlewareConsumer, NestModule, OnModuleInit } from "@nestjs/common";
2
- import { HttpAdapterHost } from "@nestjs/core";
3
- import { Auth } from "better-auth";
1
+ import { MiddlewareConsumer, NestModule } from "@nestjs/common";
4
2
  import { ConfigurableModuleClass } from "./auth.module-definition";
3
+ import { AuthService } from "./auth.service";
5
4
  import { AuthModuleOptions } from "./auth-module-options.interface";
6
- export declare class AuthModule extends ConfigurableModuleClass implements NestModule, OnModuleInit {
7
- private readonly adapterHost;
8
- private readonly auth;
5
+ export declare class AuthModule extends ConfigurableModuleClass implements NestModule {
6
+ private readonly authService;
9
7
  private readonly options;
10
- constructor(adapterHost: HttpAdapterHost, auth: Auth, options: AuthModuleOptions);
8
+ constructor(authService: AuthService, options: AuthModuleOptions);
11
9
  configure(consumer: MiddlewareConsumer): void;
12
- onModuleInit(): void;
13
10
  }
@@ -14,8 +14,8 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.AuthModule = void 0;
16
16
  const core_1 = require("@mikro-orm/core");
17
+ const request_context_1 = require("@nest-boot/request-context");
17
18
  const common_1 = require("@nestjs/common");
18
- const core_2 = require("@nestjs/core");
19
19
  const better_auth_1 = require("better-auth");
20
20
  const node_1 = require("better-auth/node");
21
21
  const mikro_orm_adapter_1 = require("./adapters/mikro-orm-adapter");
@@ -23,47 +23,53 @@ const auth_constants_1 = require("./auth.constants");
23
23
  const auth_middleware_1 = require("./auth.middleware");
24
24
  const auth_module_definition_1 = require("./auth.module-definition");
25
25
  const auth_service_1 = require("./auth.service");
26
- const authProvider = {
27
- provide: auth_constants_1.AUTH_TOKEN,
28
- inject: [auth_module_definition_1.MODULE_OPTIONS_TOKEN, core_1.MikroORM],
29
- useFactory: (options, orm) => (0, better_auth_1.betterAuth)({
30
- ...options,
31
- database: (0, mikro_orm_adapter_1.mikroOrmAdapter)({
32
- orm,
33
- entities: options.entities,
34
- }),
35
- }),
36
- };
37
26
  let AuthModule = class AuthModule extends auth_module_definition_1.ConfigurableModuleClass {
38
- constructor(adapterHost, auth, options) {
27
+ constructor(authService, options) {
39
28
  super();
40
- this.adapterHost = adapterHost;
41
- this.auth = auth;
29
+ this.authService = authService;
42
30
  this.options = options;
43
31
  }
44
32
  configure(consumer) {
45
- const proxy = consumer.apply(auth_middleware_1.AuthMiddleware);
46
- if (this.options.middleware?.excludeRoutes) {
47
- proxy.exclude(...this.options.middleware.excludeRoutes);
48
- }
49
- proxy.forRoutes(...(this.options.middleware?.includeRoutes ?? ["*"]));
50
- }
51
- onModuleInit() {
52
- const httpAdapter = this.adapterHost.httpAdapter;
53
- if (httpAdapter) {
54
- const app = httpAdapter.getInstance();
55
- app.all(this.options.basePath ?? "/api/auth/{*any}", (0, node_1.toNodeHandler)(this.auth));
33
+ consumer
34
+ .apply((0, node_1.toNodeHandler)(this.authService.auth))
35
+ .forRoutes(this.options.basePath ?? "/api/auth/{*any}");
36
+ if (this.options.middleware?.register !== false) {
37
+ const proxy = consumer.apply(auth_middleware_1.AuthMiddleware);
38
+ if (this.options.middleware?.excludeRoutes) {
39
+ proxy.exclude(...this.options.middleware.excludeRoutes);
40
+ }
41
+ if (this.options.middleware?.includeRoutes) {
42
+ proxy.forRoutes(...this.options.middleware.includeRoutes);
43
+ }
44
+ else {
45
+ proxy.forRoutes("*");
46
+ }
56
47
  }
57
48
  }
58
49
  };
59
50
  exports.AuthModule = AuthModule;
60
51
  exports.AuthModule = AuthModule = __decorate([
52
+ (0, common_1.Global)(),
61
53
  (0, common_1.Module)({
62
- providers: [authProvider, auth_service_1.AuthService],
63
- exports: [auth_service_1.AuthService],
54
+ imports: [request_context_1.RequestContextModule],
55
+ providers: [
56
+ auth_service_1.AuthService,
57
+ auth_middleware_1.AuthMiddleware,
58
+ {
59
+ provide: auth_constants_1.AUTH_TOKEN,
60
+ inject: [auth_module_definition_1.MODULE_OPTIONS_TOKEN, core_1.MikroORM],
61
+ useFactory: (options, orm) => (0, better_auth_1.betterAuth)({
62
+ ...options,
63
+ database: (0, mikro_orm_adapter_1.mikroOrmAdapter)({
64
+ orm,
65
+ entities: options.entities,
66
+ }),
67
+ }),
68
+ },
69
+ ],
70
+ exports: [auth_service_1.AuthService, auth_middleware_1.AuthMiddleware],
64
71
  }),
65
- __param(1, (0, common_1.Inject)(auth_constants_1.AUTH_TOKEN)),
66
- __param(2, (0, common_1.Inject)(auth_module_definition_1.MODULE_OPTIONS_TOKEN)),
67
- __metadata("design:paramtypes", [core_2.HttpAdapterHost, Object, Object])
72
+ __param(1, (0, common_1.Inject)(auth_module_definition_1.MODULE_OPTIONS_TOKEN)),
73
+ __metadata("design:paramtypes", [auth_service_1.AuthService, Object])
68
74
  ], AuthModule);
69
75
  //# sourceMappingURL=auth.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../src/auth.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0CAA2C;AAC3C,2CAOwB;AACxB,uCAA+C;AAC/C,6CAA+C;AAC/C,2CAAiD;AAGjD,oEAA+D;AAC/D,qDAA8C;AAC9C,uDAAmD;AACnD,qEAGkC;AAClC,iDAA6C;AAG7C,MAAM,YAAY,GAAa;IAC7B,OAAO,EAAE,2BAAU;IACnB,MAAM,EAAE,CAAC,6CAAoB,EAAE,eAAQ,CAAC;IACxC,UAAU,EAAE,CAAC,OAA0B,EAAE,GAAa,EAAE,EAAE,CACxD,IAAA,wBAAU,EAAC;QACT,GAAG,OAAO;QACV,QAAQ,EAAE,IAAA,mCAAe,EAAC;YACxB,GAAG;YACH,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,CAAC;KACH,CAAC;CACL,CAAC;AAMK,IAAM,UAAU,GAAhB,MAAM,UACX,SAAQ,gD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GAAE;IACR,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,sCAAoB,CAAC;QAC/B,SAAS,EAAE;YACT,0BAAW;YACX,gCAAc;YACd;gBACE,OAAO,EAAE,2BAAU;gBACnB,MAAM,EAAE,CAAC,6CAAoB,EAAE,eAAQ,CAAC;gBACxC,UAAU,EAAE,CAAC,OAA0B,EAAE,GAAa,EAAE,EAAE,CACxD,IAAA,wBAAU,EAAC;oBACT,GAAG,OAAO;oBACV,QAAQ,EAAE,IAAA,mCAAe,EAAC;wBACxB,GAAG;wBACH,QAAQ,EAAE,OAAO,CAAC,QAAQ;qBAC3B,CAAC;iBACH,CAAC;aACL;SACF;QACD,OAAO,EAAE,CAAC,0BAAW,EAAE,gCAAc,CAAC;KACvC,CAAC;IAIG,WAAA,IAAA,eAAM,EAAC,6CAAoB,CAAC,CAAA;qCADC,0BAAW;GAFhC,UAAU,CA4BtB"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from "./auth.constants";
2
2
  export * from "./auth.guard";
3
3
  export * from "./auth.module";
4
+ export * from "./auth.transaction-context";
4
5
  export * from "./auth-module-options.interface";
5
6
  export * from "./decorators";
6
7
  export * from "./entities";
package/dist/index.js CHANGED
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./auth.constants"), exports);
18
18
  __exportStar(require("./auth.guard"), exports);
19
19
  __exportStar(require("./auth.module"), exports);
20
+ __exportStar(require("./auth.transaction-context"), exports);
20
21
  __exportStar(require("./auth-module-options.interface"), exports);
21
22
  __exportStar(require("./decorators"), exports);
22
23
  __exportStar(require("./entities"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,+CAA6B;AAC7B,gDAA8B;AAC9B,kEAAgD;AAChD,+CAA6B;AAC7B,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,+CAA6B;AAC7B,gDAA8B;AAC9B,6DAA2C;AAC3C,kEAAgD;AAChD,+CAA6B;AAC7B,6CAA2B"}