@vynelix/nestjs-multi-auth 0.0.2

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.
Files changed (226) hide show
  1. package/README.md +760 -0
  2. package/bin/cli.js +152 -0
  3. package/dist/auth/auth-type.enum.d.ts +22 -0
  4. package/dist/auth/auth-type.enum.js +32 -0
  5. package/dist/auth/auth-type.enum.js.map +1 -0
  6. package/dist/auth/auth.controller.d.ts +70 -0
  7. package/dist/auth/auth.controller.js +434 -0
  8. package/dist/auth/auth.controller.js.map +1 -0
  9. package/dist/auth/auth.module.d.ts +9 -0
  10. package/dist/auth/auth.module.js +193 -0
  11. package/dist/auth/auth.module.js.map +1 -0
  12. package/dist/auth/auth.service.d.ts +180 -0
  13. package/dist/auth/auth.service.js +695 -0
  14. package/dist/auth/auth.service.js.map +1 -0
  15. package/dist/auth/core/auth-mapper.d.ts +6 -0
  16. package/dist/auth/core/auth-mapper.js +17 -0
  17. package/dist/auth/core/auth-mapper.js.map +1 -0
  18. package/dist/auth/core/jwt.strategy.d.ts +13 -0
  19. package/dist/auth/core/jwt.strategy.js +59 -0
  20. package/dist/auth/core/jwt.strategy.js.map +1 -0
  21. package/dist/auth/core/registration.d.ts +3 -0
  22. package/dist/auth/core/registration.js +60 -0
  23. package/dist/auth/core/registration.js.map +1 -0
  24. package/dist/auth/current-user-interface.d.ts +4 -0
  25. package/dist/auth/current-user-interface.js +4 -0
  26. package/dist/auth/current-user-interface.js.map +1 -0
  27. package/dist/auth/current-user.decorator.d.ts +2 -0
  28. package/dist/auth/current-user.decorator.js +16 -0
  29. package/dist/auth/current-user.decorator.js.map +1 -0
  30. package/dist/auth/decorator/current-user.decorator.d.ts +2 -0
  31. package/dist/auth/decorator/current-user.decorator.js +13 -0
  32. package/dist/auth/decorator/current-user.decorator.js.map +1 -0
  33. package/dist/auth/decorator/email-or-phone.decorator.d.ts +2 -0
  34. package/dist/auth/decorator/email-or-phone.decorator.js +26 -0
  35. package/dist/auth/decorator/email-or-phone.decorator.js.map +1 -0
  36. package/dist/auth/decorator/optional.decorator.d.ts +2 -0
  37. package/dist/auth/decorator/optional.decorator.js +9 -0
  38. package/dist/auth/decorator/optional.decorator.js.map +1 -0
  39. package/dist/auth/decorator/public.decorator.d.ts +2 -0
  40. package/dist/auth/decorator/public.decorator.js +9 -0
  41. package/dist/auth/decorator/public.decorator.js.map +1 -0
  42. package/dist/auth/dto/auth-response.dto.d.ts +17 -0
  43. package/dist/auth/dto/auth-response.dto.js +83 -0
  44. package/dist/auth/dto/auth-response.dto.js.map +1 -0
  45. package/dist/auth/dto/identifier-response.dto.d.ts +8 -0
  46. package/dist/auth/dto/identifier-response.dto.js +46 -0
  47. package/dist/auth/dto/identifier-response.dto.js.map +1 -0
  48. package/dist/auth/dto/login.dto.d.ts +11 -0
  49. package/dist/auth/dto/login.dto.js +68 -0
  50. package/dist/auth/dto/login.dto.js.map +1 -0
  51. package/dist/auth/dto/mfa.dto.d.ts +8 -0
  52. package/dist/auth/dto/mfa.dto.js +51 -0
  53. package/dist/auth/dto/mfa.dto.js.map +1 -0
  54. package/dist/auth/dto/oauth-provider-response.dto.d.ts +5 -0
  55. package/dist/auth/dto/oauth-provider-response.dto.js +30 -0
  56. package/dist/auth/dto/oauth-provider-response.dto.js.map +1 -0
  57. package/dist/auth/dto/refresh-token.dto.d.ts +3 -0
  58. package/dist/auth/dto/refresh-token.dto.js +28 -0
  59. package/dist/auth/dto/refresh-token.dto.js.map +1 -0
  60. package/dist/auth/dto/requests/forgot-password.dto.d.ts +5 -0
  61. package/dist/auth/dto/requests/forgot-password.dto.js +36 -0
  62. package/dist/auth/dto/requests/forgot-password.dto.js.map +1 -0
  63. package/dist/auth/dto/requests/login.dto.d.ts +11 -0
  64. package/dist/auth/dto/requests/login.dto.js +68 -0
  65. package/dist/auth/dto/requests/login.dto.js.map +1 -0
  66. package/dist/auth/dto/requests/magic-link.dto.d.ts +6 -0
  67. package/dist/auth/dto/requests/magic-link.dto.js +33 -0
  68. package/dist/auth/dto/requests/magic-link.dto.js.map +1 -0
  69. package/dist/auth/dto/requests/mfa.dto.d.ts +8 -0
  70. package/dist/auth/dto/requests/mfa.dto.js +51 -0
  71. package/dist/auth/dto/requests/mfa.dto.js.map +1 -0
  72. package/dist/auth/dto/requests/refresh-token.dto.d.ts +3 -0
  73. package/dist/auth/dto/requests/refresh-token.dto.js +29 -0
  74. package/dist/auth/dto/requests/refresh-token.dto.js.map +1 -0
  75. package/dist/auth/dto/requests/reset-password.dto.d.ts +5 -0
  76. package/dist/auth/dto/requests/reset-password.dto.js +36 -0
  77. package/dist/auth/dto/requests/reset-password.dto.js.map +1 -0
  78. package/dist/auth/dto/requests/secure-account.dto.d.ts +3 -0
  79. package/dist/auth/dto/requests/secure-account.dto.js +24 -0
  80. package/dist/auth/dto/requests/secure-account.dto.js.map +1 -0
  81. package/dist/auth/dto/requests/signup.dto.d.ts +13 -0
  82. package/dist/auth/dto/requests/signup.dto.js +70 -0
  83. package/dist/auth/dto/requests/signup.dto.js.map +1 -0
  84. package/dist/auth/dto/requests/update-password.dto.d.ts +4 -0
  85. package/dist/auth/dto/requests/update-password.dto.js +30 -0
  86. package/dist/auth/dto/requests/update-password.dto.js.map +1 -0
  87. package/dist/auth/dto/requests/verify.dto.d.ts +7 -0
  88. package/dist/auth/dto/requests/verify.dto.js +48 -0
  89. package/dist/auth/dto/requests/verify.dto.js.map +1 -0
  90. package/dist/auth/dto/responses/auth-response.dto.d.ts +17 -0
  91. package/dist/auth/dto/responses/auth-response.dto.js +83 -0
  92. package/dist/auth/dto/responses/auth-response.dto.js.map +1 -0
  93. package/dist/auth/dto/responses/identifier-response.dto.d.ts +10 -0
  94. package/dist/auth/dto/responses/identifier-response.dto.js +56 -0
  95. package/dist/auth/dto/responses/identifier-response.dto.js.map +1 -0
  96. package/dist/auth/dto/responses/oauth-provider-response.dto.d.ts +10 -0
  97. package/dist/auth/dto/responses/oauth-provider-response.dto.js +55 -0
  98. package/dist/auth/dto/responses/oauth-provider-response.dto.js.map +1 -0
  99. package/dist/auth/dto/signup.dto.d.ts +13 -0
  100. package/dist/auth/dto/signup.dto.js +70 -0
  101. package/dist/auth/dto/signup.dto.js.map +1 -0
  102. package/dist/auth/dto/verify.dto.d.ts +7 -0
  103. package/dist/auth/dto/verify.dto.js +48 -0
  104. package/dist/auth/dto/verify.dto.js.map +1 -0
  105. package/dist/auth/entities/auth-identify.entity.d.ts +33 -0
  106. package/dist/auth/entities/auth-identify.entity.js +73 -0
  107. package/dist/auth/entities/auth-identify.entity.js.map +1 -0
  108. package/dist/auth/entities/auth.entity.d.ts +45 -0
  109. package/dist/auth/entities/auth.entity.js +129 -0
  110. package/dist/auth/entities/auth.entity.js.map +1 -0
  111. package/dist/auth/entities/base.entity.d.ts +6 -0
  112. package/dist/auth/entities/base.entity.js +41 -0
  113. package/dist/auth/entities/base.entity.js.map +1 -0
  114. package/dist/auth/entities/mfa-method.entity.d.ts +23 -0
  115. package/dist/auth/entities/mfa-method.entity.js +69 -0
  116. package/dist/auth/entities/mfa-method.entity.js.map +1 -0
  117. package/dist/auth/entities/oauth-provider.entity.d.ts +38 -0
  118. package/dist/auth/entities/oauth-provider.entity.js +88 -0
  119. package/dist/auth/entities/oauth-provider.entity.js.map +1 -0
  120. package/dist/auth/entities/otp-token.entity.d.ts +22 -0
  121. package/dist/auth/entities/otp-token.entity.js +61 -0
  122. package/dist/auth/entities/otp-token.entity.js.map +1 -0
  123. package/dist/auth/entities/session.entity.d.ts +19 -0
  124. package/dist/auth/entities/session.entity.js +65 -0
  125. package/dist/auth/entities/session.entity.js.map +1 -0
  126. package/dist/auth/enums/auth-type.enum.d.ts +23 -0
  127. package/dist/auth/enums/auth-type.enum.js +34 -0
  128. package/dist/auth/enums/auth-type.enum.js.map +1 -0
  129. package/dist/auth/guards/jwt-auth.guard.d.ts +10 -0
  130. package/dist/auth/guards/jwt-auth.guard.js +68 -0
  131. package/dist/auth/guards/jwt-auth.guard.js.map +1 -0
  132. package/dist/auth/guards/optional-auth.guard.d.ts +8 -0
  133. package/dist/auth/guards/optional-auth.guard.js +45 -0
  134. package/dist/auth/guards/optional-auth.guard.js.map +1 -0
  135. package/dist/auth/guards/ws-jwt-auth.guard.d.ts +0 -0
  136. package/dist/auth/guards/ws-jwt-auth.guard.js +31 -0
  137. package/dist/auth/guards/ws-jwt-auth.guard.js.map +1 -0
  138. package/dist/auth/interfaces/auth-module-async-options.interface.d.ts +7 -0
  139. package/dist/auth/interfaces/auth-module-async-options.interface.js +3 -0
  140. package/dist/auth/interfaces/auth-module-async-options.interface.js.map +1 -0
  141. package/dist/auth/interfaces/auth-module-options.interface.d.ts +132 -0
  142. package/dist/auth/interfaces/auth-module-options.interface.js +5 -0
  143. package/dist/auth/interfaces/auth-module-options.interface.js.map +1 -0
  144. package/dist/auth/interfaces/auth-notification-provider.interface.d.ts +29 -0
  145. package/dist/auth/interfaces/auth-notification-provider.interface.js +5 -0
  146. package/dist/auth/interfaces/auth-notification-provider.interface.js.map +1 -0
  147. package/dist/auth/interfaces/auth-user-service.interface.d.ts +13 -0
  148. package/dist/auth/interfaces/auth-user-service.interface.js +7 -0
  149. package/dist/auth/interfaces/auth-user-service.interface.js.map +1 -0
  150. package/dist/auth/interfaces/current-user-interface.d.ts +4 -0
  151. package/dist/auth/interfaces/current-user-interface.js +4 -0
  152. package/dist/auth/interfaces/current-user-interface.js.map +1 -0
  153. package/dist/auth/interfaces/current-user.decorator.d.ts +2 -0
  154. package/dist/auth/interfaces/current-user.decorator.js +16 -0
  155. package/dist/auth/interfaces/current-user.decorator.js.map +1 -0
  156. package/dist/auth/interfaces/jwt-payload-interface.d.ts +4 -0
  157. package/dist/auth/interfaces/jwt-payload-interface.js +3 -0
  158. package/dist/auth/interfaces/jwt-payload-interface.js.map +1 -0
  159. package/dist/auth/interfaces/oauth-strategy.interface.d.ts +14 -0
  160. package/dist/auth/interfaces/oauth-strategy.interface.js +3 -0
  161. package/dist/auth/interfaces/oauth-strategy.interface.js.map +1 -0
  162. package/dist/auth/jwt-payload-interface.d.ts +4 -0
  163. package/dist/auth/jwt-payload-interface.js +3 -0
  164. package/dist/auth/jwt-payload-interface.js.map +1 -0
  165. package/dist/auth/jwt.strategy.d.ts +13 -0
  166. package/dist/auth/jwt.strategy.js +60 -0
  167. package/dist/auth/jwt.strategy.js.map +1 -0
  168. package/dist/auth/strategies/company.strategy.d.ts +0 -0
  169. package/dist/auth/strategies/company.strategy.js +1 -0
  170. package/dist/auth/strategies/company.strategy.js.map +1 -0
  171. package/dist/auth/strategies/google.strategy.d.ts +7 -0
  172. package/dist/auth/strategies/google.strategy.js +23 -0
  173. package/dist/auth/strategies/google.strategy.js.map +1 -0
  174. package/dist/auth/strategies/local-auth.strategy.d.ts +24 -0
  175. package/dist/auth/strategies/local-auth.strategy.js +244 -0
  176. package/dist/auth/strategies/local-auth.strategy.js.map +1 -0
  177. package/dist/auth/strategies/oauth/apple.strategy.d.ts +27 -0
  178. package/dist/auth/strategies/oauth/apple.strategy.js +176 -0
  179. package/dist/auth/strategies/oauth/apple.strategy.js.map +1 -0
  180. package/dist/auth/strategies/oauth/facebook.strategy.d.ts +24 -0
  181. package/dist/auth/strategies/oauth/facebook.strategy.js +150 -0
  182. package/dist/auth/strategies/oauth/facebook.strategy.js.map +1 -0
  183. package/dist/auth/strategies/oauth/google.strategy.d.ts +25 -0
  184. package/dist/auth/strategies/oauth/google.strategy.js +225 -0
  185. package/dist/auth/strategies/oauth/google.strategy.js.map +1 -0
  186. package/dist/auth/strategies/oauth/oauth-strategy.interface.d.ts +14 -0
  187. package/dist/auth/strategies/oauth/oauth-strategy.interface.js +3 -0
  188. package/dist/auth/strategies/oauth/oauth-strategy.interface.js.map +1 -0
  189. package/dist/auth/strategies/oauth/oauth.strategy.d.ts +25 -0
  190. package/dist/auth/strategies/oauth/oauth.strategy.js +70 -0
  191. package/dist/auth/strategies/oauth/oauth.strategy.js.map +1 -0
  192. package/dist/auth/strategies/otp.strategy.d.ts +7 -0
  193. package/dist/auth/strategies/otp.strategy.js +23 -0
  194. package/dist/auth/strategies/otp.strategy.js.map +1 -0
  195. package/dist/auth/strategies/password.strategy.d.ts +14 -0
  196. package/dist/auth/strategies/password.strategy.js +130 -0
  197. package/dist/auth/strategies/password.strategy.js.map +1 -0
  198. package/dist/auth/utils/duration.util.d.ts +8 -0
  199. package/dist/auth/utils/duration.util.js +29 -0
  200. package/dist/auth/utils/duration.util.js.map +1 -0
  201. package/dist/index.d.ts +21 -0
  202. package/dist/index.js +39 -0
  203. package/dist/index.js.map +1 -0
  204. package/dist/migrations/auth-entities.d.ts +7 -0
  205. package/dist/migrations/auth-entities.js +18 -0
  206. package/dist/migrations/auth-entities.js.map +1 -0
  207. package/dist/migrations/auth-schema.initializer.d.ts +9 -0
  208. package/dist/migrations/auth-schema.initializer.js +36 -0
  209. package/dist/migrations/auth-schema.initializer.js.map +1 -0
  210. package/dist/migrations/auth.migration.v1.d.ts +12 -0
  211. package/dist/migrations/auth.migration.v1.js +157 -0
  212. package/dist/migrations/auth.migration.v1.js.map +1 -0
  213. package/dist/migrations/auth.migration.v2.d.ts +8 -0
  214. package/dist/migrations/auth.migration.v2.js +39 -0
  215. package/dist/migrations/auth.migration.v2.js.map +1 -0
  216. package/dist/migrations/auth.migrations.d.ts +2 -0
  217. package/dist/migrations/auth.migrations.js +8 -0
  218. package/dist/migrations/auth.migrations.js.map +1 -0
  219. package/dist/migrations/migration.runner.d.ts +9 -0
  220. package/dist/migrations/migration.runner.js +67 -0
  221. package/dist/migrations/migration.runner.js.map +1 -0
  222. package/dist/migrations/migration.service.d.ts +9 -0
  223. package/dist/migrations/migration.service.js +71 -0
  224. package/dist/migrations/migration.service.js.map +1 -0
  225. package/dist/tsconfig.tsbuildinfo +1 -0
  226. package/package.json +82 -0
@@ -0,0 +1,434 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.AuthController = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const throttler_1 = require("@nestjs/throttler");
18
+ const auth_service_1 = require("./auth.service");
19
+ const login_dto_1 = require("./dto/requests/login.dto");
20
+ const signup_dto_1 = require("./dto/requests/signup.dto");
21
+ const verify_dto_1 = require("./dto/requests/verify.dto");
22
+ const mfa_dto_1 = require("./dto/requests/mfa.dto");
23
+ const refresh_token_dto_1 = require("./dto/requests/refresh-token.dto");
24
+ const forgot_password_dto_1 = require("./dto/requests/forgot-password.dto");
25
+ const reset_password_dto_1 = require("./dto/requests/reset-password.dto");
26
+ const update_password_dto_1 = require("./dto/requests/update-password.dto");
27
+ const magic_link_dto_1 = require("./dto/requests/magic-link.dto");
28
+ const secure_account_dto_1 = require("./dto/requests/secure-account.dto");
29
+ const common_2 = require("@nestjs/common");
30
+ const swagger_1 = require("@nestjs/swagger");
31
+ const public_decorator_1 = require("./decorator/public.decorator");
32
+ const auth_module_options_interface_1 = require("./interfaces/auth-module-options.interface");
33
+ const auth_type_enum_1 = require("./enums/auth-type.enum");
34
+ const duration_util_1 = require("./utils/duration.util");
35
+ let AuthController = class AuthController {
36
+ constructor(authService, options) {
37
+ this.authService = authService;
38
+ this.options = options;
39
+ }
40
+ getTransports() {
41
+ const t = this.options.transport || [auth_type_enum_1.AuthTransport.BEARER];
42
+ return Array.isArray(t) ? t : [t];
43
+ }
44
+ getDynamicPath(req) {
45
+ const baseUrl = req.originalUrl.split('?')[0];
46
+ const lastSlashIndex = baseUrl.lastIndexOf('/');
47
+ return baseUrl.substring(0, lastSlashIndex) + '/refresh';
48
+ }
49
+ setCookies(res, req, accessToken, refreshToken) {
50
+ const isProduction = process.env.NODE_ENV === 'production';
51
+ const refreshPath = this.getDynamicPath(req);
52
+ res.cookie('refresh_token', refreshToken, {
53
+ httpOnly: true,
54
+ secure: isProduction,
55
+ sameSite: isProduction ? 'none' : 'lax',
56
+ path: refreshPath,
57
+ maxAge: (0, duration_util_1.parseDuration)(this.options.refreshTokenExpiresIn || '7d', 7 * 24 * 60 * 60) * 1000,
58
+ });
59
+ res.cookie('access_token', accessToken, {
60
+ httpOnly: true,
61
+ secure: isProduction,
62
+ sameSite: isProduction ? 'none' : 'lax',
63
+ path: '/',
64
+ maxAge: (0, duration_util_1.parseDuration)(this.options.accessTokenExpiresIn || '15m', 15 * 60) * 1000,
65
+ });
66
+ }
67
+ async signup(dto, res, req) {
68
+ try {
69
+ const result = await this.authService.signup(dto, undefined, req.headers['user-agent'], req.ip);
70
+ const transports = this.getTransports();
71
+ if ('accessToken' in result) {
72
+ if (transports.includes(auth_type_enum_1.AuthTransport.COOKIE) || transports.includes(auth_type_enum_1.AuthTransport.BOTH)) {
73
+ this.setCookies(res, req, result.accessToken, result.refreshToken);
74
+ }
75
+ }
76
+ const response = { message: result.message || 'Signup successful', auth: result.auth };
77
+ if (result.verificationRequired)
78
+ response.verificationRequired = true;
79
+ if ('accessToken' in result && (transports.includes(auth_type_enum_1.AuthTransport.BEARER) || transports.includes(auth_type_enum_1.AuthTransport.BOTH))) {
80
+ response.tokens = { accessToken: result.accessToken, refreshToken: result.refreshToken };
81
+ }
82
+ return response;
83
+ }
84
+ catch (e) {
85
+ throw new common_1.HttpException(e.message, common_1.HttpStatus.BAD_REQUEST);
86
+ }
87
+ }
88
+ async login(dto, res, req) {
89
+ try {
90
+ const result = await this.authService.login(dto, req.headers['user-agent'], req.ip);
91
+ const transports = this.getTransports();
92
+ if ('accessToken' in result) {
93
+ if (transports.includes(auth_type_enum_1.AuthTransport.COOKIE) || transports.includes(auth_type_enum_1.AuthTransport.BOTH)) {
94
+ this.setCookies(res, req, result.accessToken, result.refreshToken);
95
+ }
96
+ }
97
+ const response = { message: result.message || 'Login successful', auth: result.auth };
98
+ if (result.verificationRequired)
99
+ response.verificationRequired = true;
100
+ if ('accessToken' in result && (transports.includes(auth_type_enum_1.AuthTransport.BEARER) || transports.includes(auth_type_enum_1.AuthTransport.BOTH))) {
101
+ response.tokens = { accessToken: result.accessToken, refreshToken: result.refreshToken };
102
+ }
103
+ return response;
104
+ }
105
+ catch (e) {
106
+ throw new common_1.HttpException(e.message, common_1.HttpStatus.UNAUTHORIZED);
107
+ }
108
+ }
109
+ async verify(dto, res, req) {
110
+ const result = await this.authService.verifyCode(dto.uid, dto.code, req.headers['user-agent'], req.ip);
111
+ const transports = this.getTransports();
112
+ if (result.tokens) {
113
+ if (transports.includes(auth_type_enum_1.AuthTransport.COOKIE) || transports.includes(auth_type_enum_1.AuthTransport.BOTH)) {
114
+ this.setCookies(res, req, result.tokens.accessToken, result.tokens.refreshToken);
115
+ }
116
+ }
117
+ const response = { message: result.message, auth: result.auth };
118
+ if (result.tokens && (transports.includes(auth_type_enum_1.AuthTransport.BEARER) || transports.includes(auth_type_enum_1.AuthTransport.BOTH))) {
119
+ response.tokens = result.tokens;
120
+ }
121
+ return response;
122
+ }
123
+ async resendVerification(dto) {
124
+ return this.authService.resendVerification(dto.uid);
125
+ }
126
+ // --- PASSWORD MANAGEMENT ---
127
+ async forgotPassword(dto) {
128
+ return this.authService.forgotPassword(dto);
129
+ }
130
+ async resetPassword(dto) {
131
+ return this.authService.resetPassword(dto);
132
+ }
133
+ async updatePassword(req, dto) {
134
+ const userAgent = req.headers['user-agent'] || 'Unknown';
135
+ const ip = req.ip || 'Unknown';
136
+ return this.authService.updatePassword(req.user.uid, dto, userAgent, ip);
137
+ }
138
+ async secureAccount(uid, dto) {
139
+ return this.authService.secureAccount({ ...dto, uid });
140
+ }
141
+ // --- MAGIC LINK ---
142
+ async requestMagicLink(dto) {
143
+ return this.authService.requestMagicLink(dto);
144
+ }
145
+ async verifyMagicLink(token, res, req) {
146
+ const result = await this.authService.verifyMagicLink({ token }, req.headers['user-agent'], req.ip);
147
+ const transports = this.getTransports();
148
+ if (result.tokens) {
149
+ if (transports.includes(auth_type_enum_1.AuthTransport.COOKIE) || transports.includes(auth_type_enum_1.AuthTransport.BOTH)) {
150
+ this.setCookies(res, req, result.tokens.accessToken, result.tokens.refreshToken);
151
+ }
152
+ }
153
+ const response = { message: 'Magic login successful', auth: result.auth };
154
+ if (result.tokens && (transports.includes(auth_type_enum_1.AuthTransport.BEARER) || transports.includes(auth_type_enum_1.AuthTransport.BOTH))) {
155
+ response.tokens = result.tokens;
156
+ }
157
+ return response;
158
+ }
159
+ async link(dto, req, res) {
160
+ try {
161
+ const result = await this.authService.signup(dto, req.user.uid, req.headers['user-agent'], req.ip);
162
+ const transports = this.getTransports();
163
+ if ('accessToken' in result) {
164
+ if (transports.includes(auth_type_enum_1.AuthTransport.COOKIE) || transports.includes(auth_type_enum_1.AuthTransport.BOTH)) {
165
+ this.setCookies(res, req, result.accessToken, result.refreshToken);
166
+ }
167
+ }
168
+ const response = { message: result.message || 'Method linked successfully', auth: result.auth };
169
+ if (result.verificationRequired)
170
+ response.verificationRequired = true;
171
+ if ('accessToken' in result && (transports.includes(auth_type_enum_1.AuthTransport.BEARER) || transports.includes(auth_type_enum_1.AuthTransport.BOTH))) {
172
+ response.tokens = { accessToken: result.accessToken, refreshToken: result.refreshToken };
173
+ }
174
+ return response;
175
+ }
176
+ catch (e) {
177
+ throw new common_1.HttpException(e.message, common_1.HttpStatus.BAD_REQUEST);
178
+ }
179
+ }
180
+ async refresh(req, res, dto) {
181
+ const transports = this.getTransports();
182
+ let token = req.cookies?.['refresh_token'] || dto.refreshToken;
183
+ if (!token && req.headers.authorization?.startsWith('Bearer ')) {
184
+ token = req.headers.authorization.split(' ')[1];
185
+ }
186
+ if (!token)
187
+ throw new common_1.BadRequestException('Refresh token is required');
188
+ try {
189
+ const tokens = await this.authService.refreshTokens(token, req.headers['user-agent'] || '', req.ip);
190
+ if (transports.includes(auth_type_enum_1.AuthTransport.COOKIE) || transports.includes(auth_type_enum_1.AuthTransport.BOTH)) {
191
+ this.setCookies(res, req, tokens.accessToken, tokens.refreshToken);
192
+ }
193
+ if (transports.includes(auth_type_enum_1.AuthTransport.BEARER) || transports.includes(auth_type_enum_1.AuthTransport.BOTH)) {
194
+ return { message: 'Token refreshed', tokens };
195
+ }
196
+ return { message: 'Token refreshed' };
197
+ }
198
+ catch (e) {
199
+ res.clearCookie('access_token');
200
+ res.clearCookie('refresh_token', { path: this.getDynamicPath(req) });
201
+ throw new common_1.HttpException('Invalid session', common_1.HttpStatus.UNAUTHORIZED);
202
+ }
203
+ }
204
+ async enrollMfa(req, dto) {
205
+ return this.authService.enrollMfa(req.user.uid, dto.type);
206
+ }
207
+ async activateMfa(req, dto) {
208
+ return this.authService.activateMfa(req.user.uid, dto.type, dto.code);
209
+ }
210
+ async logout(req, res, dto) {
211
+ let token = req.cookies?.['refresh_token'] || dto.refreshToken;
212
+ if (!token && req.headers.authorization?.startsWith('Bearer ')) {
213
+ token = req.headers.authorization.split(' ')[1];
214
+ }
215
+ await this.authService.logout(token);
216
+ res.clearCookie('access_token');
217
+ res.clearCookie('refresh_token', { path: this.getDynamicPath(req) });
218
+ return { message: 'Logged out successfully' };
219
+ }
220
+ // @OptionalAuth()
221
+ // @Get('')
222
+ // async all() {
223
+ // return this.authService.viewAll();
224
+ // }
225
+ async me(req) {
226
+ return this.authService.me(req.user.uid);
227
+ }
228
+ async viewAll(req) {
229
+ return this.authService.viewAllMyAuthMethods(req.user.uid);
230
+ }
231
+ async deleteAccount(req, res) {
232
+ await this.authService.deleteAccount(req.user.uid);
233
+ res.clearCookie('access_token');
234
+ res.clearCookie('refresh_token', { path: this.getDynamicPath(req) });
235
+ return { message: 'Account deleted successfully' };
236
+ }
237
+ async deleteAuthMethod(req, authId) {
238
+ return this.authService.deleteAuthMethod(req.user.uid, authId);
239
+ }
240
+ };
241
+ exports.AuthController = AuthController;
242
+ __decorate([
243
+ (0, common_1.Post)('signup'),
244
+ (0, public_decorator_1.Public)(),
245
+ (0, throttler_1.Throttle)({ default: { limit: 5, ttl: 60000 } }),
246
+ (0, swagger_1.ApiOperation)({ summary: 'User signup' }),
247
+ __param(0, (0, common_1.Body)()),
248
+ __param(1, (0, common_1.Res)({ passthrough: true })),
249
+ __param(2, (0, common_1.Req)()),
250
+ __metadata("design:type", Function),
251
+ __metadata("design:paramtypes", [signup_dto_1.SignupDto, Object, Object]),
252
+ __metadata("design:returntype", Promise)
253
+ ], AuthController.prototype, "signup", null);
254
+ __decorate([
255
+ (0, common_1.Post)('signin'),
256
+ (0, public_decorator_1.Public)(),
257
+ (0, throttler_1.Throttle)({ default: { limit: 5, ttl: 60000 } }),
258
+ (0, swagger_1.ApiOperation)({ summary: 'User login' }),
259
+ __param(0, (0, common_1.Body)()),
260
+ __param(1, (0, common_1.Res)({ passthrough: true })),
261
+ __param(2, (0, common_1.Req)()),
262
+ __metadata("design:type", Function),
263
+ __metadata("design:paramtypes", [login_dto_1.LoginDto, Object, Object]),
264
+ __metadata("design:returntype", Promise)
265
+ ], AuthController.prototype, "login", null);
266
+ __decorate([
267
+ (0, common_1.Post)('verify'),
268
+ (0, public_decorator_1.Public)(),
269
+ (0, swagger_1.ApiOperation)({ summary: 'Verify identity with OTP code' }),
270
+ __param(0, (0, common_1.Body)()),
271
+ __param(1, (0, common_1.Res)({ passthrough: true })),
272
+ __param(2, (0, common_1.Req)()),
273
+ __metadata("design:type", Function),
274
+ __metadata("design:paramtypes", [verify_dto_1.VerifyDto, Object, Object]),
275
+ __metadata("design:returntype", Promise)
276
+ ], AuthController.prototype, "verify", null);
277
+ __decorate([
278
+ (0, common_1.Post)('resend-verification'),
279
+ (0, public_decorator_1.Public)(),
280
+ (0, swagger_1.ApiOperation)({ summary: 'Resend verification code' }),
281
+ __param(0, (0, common_1.Body)()),
282
+ __metadata("design:type", Function),
283
+ __metadata("design:paramtypes", [verify_dto_1.ResendVerificationDto]),
284
+ __metadata("design:returntype", Promise)
285
+ ], AuthController.prototype, "resendVerification", null);
286
+ __decorate([
287
+ (0, common_1.Post)('forgot-password'),
288
+ (0, public_decorator_1.Public)(),
289
+ (0, throttler_1.Throttle)({ default: { limit: 3, ttl: 60000 } }),
290
+ (0, swagger_1.ApiOperation)({ summary: 'Forgot password - request reset code' }),
291
+ __param(0, (0, common_1.Body)()),
292
+ __metadata("design:type", Function),
293
+ __metadata("design:paramtypes", [forgot_password_dto_1.ForgotPasswordDto]),
294
+ __metadata("design:returntype", Promise)
295
+ ], AuthController.prototype, "forgotPassword", null);
296
+ __decorate([
297
+ (0, common_1.Post)('reset-password'),
298
+ (0, public_decorator_1.Public)(),
299
+ (0, swagger_1.ApiOperation)({ summary: 'Reset password using OTP code' }),
300
+ __param(0, (0, common_1.Body)()),
301
+ __metadata("design:type", Function),
302
+ __metadata("design:paramtypes", [reset_password_dto_1.ResetPasswordDto]),
303
+ __metadata("design:returntype", Promise)
304
+ ], AuthController.prototype, "resetPassword", null);
305
+ __decorate([
306
+ (0, common_2.Patch)('password'),
307
+ (0, swagger_1.ApiOperation)({ summary: 'Update password (must be logged in)' }),
308
+ __param(0, (0, common_1.Req)()),
309
+ __param(1, (0, common_1.Body)()),
310
+ __metadata("design:type", Function),
311
+ __metadata("design:paramtypes", [Object, update_password_dto_1.UpdatePasswordDto]),
312
+ __metadata("design:returntype", Promise)
313
+ ], AuthController.prototype, "updatePassword", null);
314
+ __decorate([
315
+ (0, common_1.Post)('secure-account'),
316
+ (0, public_decorator_1.Public)(),
317
+ (0, swagger_1.ApiOperation)({ summary: 'Lock account and invalidate sessions (via security link)' }),
318
+ __param(0, (0, common_2.Query)('uid')),
319
+ __param(1, (0, common_1.Body)()),
320
+ __metadata("design:type", Function),
321
+ __metadata("design:paramtypes", [String, secure_account_dto_1.SecureAccountDto]),
322
+ __metadata("design:returntype", Promise)
323
+ ], AuthController.prototype, "secureAccount", null);
324
+ __decorate([
325
+ (0, common_1.Post)('magic-link'),
326
+ (0, public_decorator_1.Public)(),
327
+ (0, throttler_1.Throttle)({ default: { limit: 3, ttl: 60000 } }),
328
+ (0, swagger_1.ApiOperation)({ summary: 'Request a magic login link' }),
329
+ __param(0, (0, common_1.Body)()),
330
+ __metadata("design:type", Function),
331
+ __metadata("design:paramtypes", [magic_link_dto_1.MagicLinkRequestDto]),
332
+ __metadata("design:returntype", Promise)
333
+ ], AuthController.prototype, "requestMagicLink", null);
334
+ __decorate([
335
+ (0, common_1.Get)('magic-callback'),
336
+ (0, public_decorator_1.Public)(),
337
+ (0, swagger_1.ApiOperation)({ summary: 'Verify magic link and login' }),
338
+ __param(0, (0, common_2.Query)('token')),
339
+ __param(1, (0, common_1.Res)({ passthrough: true })),
340
+ __param(2, (0, common_1.Req)()),
341
+ __metadata("design:type", Function),
342
+ __metadata("design:paramtypes", [String, Object, Object]),
343
+ __metadata("design:returntype", Promise)
344
+ ], AuthController.prototype, "verifyMagicLink", null);
345
+ __decorate([
346
+ (0, common_1.Post)('link'),
347
+ (0, swagger_1.ApiOperation)({ summary: 'Link new auth method to current account' }),
348
+ __param(0, (0, common_1.Body)()),
349
+ __param(1, (0, common_1.Req)()),
350
+ __param(2, (0, common_1.Res)({ passthrough: true })),
351
+ __metadata("design:type", Function),
352
+ __metadata("design:paramtypes", [signup_dto_1.SignupDto, Object, Object]),
353
+ __metadata("design:returntype", Promise)
354
+ ], AuthController.prototype, "link", null);
355
+ __decorate([
356
+ (0, common_1.Post)('refresh'),
357
+ (0, public_decorator_1.Public)(),
358
+ (0, swagger_1.ApiOperation)({ summary: 'Refresh access token' }),
359
+ __param(0, (0, common_1.Req)()),
360
+ __param(1, (0, common_1.Res)({ passthrough: true })),
361
+ __param(2, (0, common_1.Body)()),
362
+ __metadata("design:type", Function),
363
+ __metadata("design:paramtypes", [Object, Object, refresh_token_dto_1.RefreshTokenDto]),
364
+ __metadata("design:returntype", Promise)
365
+ ], AuthController.prototype, "refresh", null);
366
+ __decorate([
367
+ (0, common_1.Post)('mfa/enroll'),
368
+ (0, swagger_1.ApiOperation)({ summary: 'Enroll in MFA (e.g., TOTP)' }),
369
+ __param(0, (0, common_1.Req)()),
370
+ __param(1, (0, common_1.Body)()),
371
+ __metadata("design:type", Function),
372
+ __metadata("design:paramtypes", [Object, mfa_dto_1.EnrollMfaDto]),
373
+ __metadata("design:returntype", Promise)
374
+ ], AuthController.prototype, "enrollMfa", null);
375
+ __decorate([
376
+ (0, common_1.Post)('mfa/activate'),
377
+ (0, swagger_1.ApiOperation)({ summary: 'Activate MFA after enrollment' }),
378
+ __param(0, (0, common_1.Req)()),
379
+ __param(1, (0, common_1.Body)()),
380
+ __metadata("design:type", Function),
381
+ __metadata("design:paramtypes", [Object, mfa_dto_1.ActivateMfaDto]),
382
+ __metadata("design:returntype", Promise)
383
+ ], AuthController.prototype, "activateMfa", null);
384
+ __decorate([
385
+ (0, common_1.Post)('logout'),
386
+ (0, swagger_1.ApiOperation)({ summary: 'User logout' }),
387
+ __param(0, (0, common_1.Req)()),
388
+ __param(1, (0, common_1.Res)({ passthrough: true })),
389
+ __param(2, (0, common_1.Body)()),
390
+ __metadata("design:type", Function),
391
+ __metadata("design:paramtypes", [Object, Object, refresh_token_dto_1.RefreshTokenDto]),
392
+ __metadata("design:returntype", Promise)
393
+ ], AuthController.prototype, "logout", null);
394
+ __decorate([
395
+ (0, common_1.Get)('/me'),
396
+ (0, swagger_1.ApiOperation)({ summary: 'View current Authentication (Auth)' }),
397
+ __param(0, (0, common_1.Req)()),
398
+ __metadata("design:type", Function),
399
+ __metadata("design:paramtypes", [Object]),
400
+ __metadata("design:returntype", Promise)
401
+ ], AuthController.prototype, "me", null);
402
+ __decorate([
403
+ (0, common_1.Get)('/me/methods'),
404
+ (0, swagger_1.ApiOperation)({ summary: 'View all authentication methods' }),
405
+ __param(0, (0, common_1.Req)()),
406
+ __metadata("design:type", Function),
407
+ __metadata("design:paramtypes", [Object]),
408
+ __metadata("design:returntype", Promise)
409
+ ], AuthController.prototype, "viewAll", null);
410
+ __decorate([
411
+ (0, common_1.Delete)('account'),
412
+ (0, swagger_1.ApiOperation)({ summary: 'Delete user account and all associated data' }),
413
+ __param(0, (0, common_1.Req)()),
414
+ __param(1, (0, common_1.Res)({ passthrough: true })),
415
+ __metadata("design:type", Function),
416
+ __metadata("design:paramtypes", [Object, Object]),
417
+ __metadata("design:returntype", Promise)
418
+ ], AuthController.prototype, "deleteAccount", null);
419
+ __decorate([
420
+ (0, common_1.Delete)('method/:id'),
421
+ (0, swagger_1.ApiOperation)({ summary: 'Delete a specific authentication method' }),
422
+ __param(0, (0, common_1.Req)()),
423
+ __param(1, (0, common_1.Param)('id')),
424
+ __metadata("design:type", Function),
425
+ __metadata("design:paramtypes", [Object, String]),
426
+ __metadata("design:returntype", Promise)
427
+ ], AuthController.prototype, "deleteAuthMethod", null);
428
+ exports.AuthController = AuthController = __decorate([
429
+ (0, common_1.Controller)('auth'),
430
+ (0, common_1.UseGuards)(throttler_1.ThrottlerGuard),
431
+ __param(1, (0, common_1.Inject)(auth_module_options_interface_1.AUTH_MODULE_OPTIONS)),
432
+ __metadata("design:paramtypes", [auth_service_1.AuthService, Object])
433
+ ], AuthController);
434
+ //# sourceMappingURL=auth.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.controller.js","sourceRoot":"","sources":["../../src/auth/auth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAcwB;AACxB,iDAA6D;AAC7D,iDAA6C;AAC7C,wDAAoD;AACpD,0DAAsD;AACtD,0DAA6E;AAC7E,oDAAsE;AACtE,wEAAmE;AACn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B"}
@@ -0,0 +1,9 @@
1
+ import { DynamicModule } from '@nestjs/common';
2
+ import { AUTH_MODULE_OPTIONS, AuthModuleOptions } from './interfaces/auth-module-options.interface';
3
+ import { AuthModuleAsyncOptions } from './interfaces/auth-module-async-options.interface';
4
+ export declare class AuthModule {
5
+ static register(options: AuthModuleOptions): DynamicModule;
6
+ private static createProviders;
7
+ static forRootAsync(options: AuthModuleAsyncOptions): DynamicModule;
8
+ }
9
+ export { AUTH_MODULE_OPTIONS };