@colveor/core 1.0.1 → 1.2.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.
Files changed (837) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +6 -0
  3. package/dist/bootstrap/bootstrap-colveor-app.d.ts.map +1 -1
  4. package/dist/bootstrap/bootstrap-colveor-app.js +22 -3
  5. package/dist/bootstrap/bootstrap-colveor-app.js.map +1 -1
  6. package/dist/common/decorators/index.d.ts +6 -0
  7. package/dist/common/decorators/index.d.ts.map +1 -1
  8. package/dist/common/decorators/index.js +8 -1
  9. package/dist/common/decorators/index.js.map +1 -1
  10. package/dist/common/decorators/ip-rate-limit-bucket.decorator.d.ts +9 -0
  11. package/dist/common/decorators/ip-rate-limit-bucket.decorator.d.ts.map +1 -0
  12. package/dist/common/decorators/ip-rate-limit-bucket.decorator.js +12 -0
  13. package/dist/common/decorators/ip-rate-limit-bucket.decorator.js.map +1 -0
  14. package/dist/common/guards/login-ip-rate-limit.guard.d.ts +12 -6
  15. package/dist/common/guards/login-ip-rate-limit.guard.d.ts.map +1 -1
  16. package/dist/common/guards/login-ip-rate-limit.guard.js +65 -21
  17. package/dist/common/guards/login-ip-rate-limit.guard.js.map +1 -1
  18. package/dist/common/guards/otp-ip-rate-limit.guard.d.ts +3 -2
  19. package/dist/common/guards/otp-ip-rate-limit.guard.d.ts.map +1 -1
  20. package/dist/common/guards/otp-ip-rate-limit.guard.js +17 -15
  21. package/dist/common/guards/otp-ip-rate-limit.guard.js.map +1 -1
  22. package/dist/common/guards/permissions.guard.d.ts.map +1 -1
  23. package/dist/common/guards/permissions.guard.js +12 -2
  24. package/dist/common/guards/permissions.guard.js.map +1 -1
  25. package/dist/common/interceptors/timeout.interceptor.d.ts +1 -1
  26. package/dist/common/interceptors/timeout.interceptor.d.ts.map +1 -1
  27. package/dist/common/interceptors/timeout.interceptor.js +5 -1
  28. package/dist/common/interceptors/timeout.interceptor.js.map +1 -1
  29. package/dist/common/interfaces/request-user.d.ts +4 -3
  30. package/dist/common/interfaces/request-user.d.ts.map +1 -1
  31. package/dist/common/utils/cache-version.util.d.ts +12 -0
  32. package/dist/common/utils/cache-version.util.d.ts.map +1 -0
  33. package/dist/common/utils/cache-version.util.js +34 -0
  34. package/dist/common/utils/cache-version.util.js.map +1 -0
  35. package/dist/common/utils/postgres-error.util.d.ts +5 -0
  36. package/dist/common/utils/postgres-error.util.d.ts.map +1 -0
  37. package/dist/common/utils/postgres-error.util.js +13 -0
  38. package/dist/common/utils/postgres-error.util.js.map +1 -0
  39. package/dist/common/utils/singleflight.util.d.ts +6 -0
  40. package/dist/common/utils/singleflight.util.d.ts.map +1 -0
  41. package/dist/common/utils/singleflight.util.js +21 -0
  42. package/dist/common/utils/singleflight.util.js.map +1 -0
  43. package/dist/common/validators/is-exclusive-auth-params.validator.js +1 -1
  44. package/dist/common/validators/is-exclusive-auth-params.validator.js.map +1 -1
  45. package/dist/common/validators/is-exclusive-delete-confirm-params.validator.js +1 -1
  46. package/dist/common/validators/is-exclusive-delete-confirm-params.validator.js.map +1 -1
  47. package/dist/config/app.config.d.ts +38 -0
  48. package/dist/config/app.config.d.ts.map +1 -1
  49. package/dist/config/app.config.js +24 -0
  50. package/dist/config/app.config.js.map +1 -1
  51. package/dist/config/database.config.d.ts +6 -0
  52. package/dist/config/database.config.d.ts.map +1 -1
  53. package/dist/config/database.config.js +3 -0
  54. package/dist/config/database.config.js.map +1 -1
  55. package/dist/config/env-flags.util.d.ts +4 -0
  56. package/dist/config/env-flags.util.d.ts.map +1 -1
  57. package/dist/config/env-flags.util.js +7 -0
  58. package/dist/config/env-flags.util.js.map +1 -1
  59. package/dist/config/env.validation.d.ts +24 -1
  60. package/dist/config/env.validation.d.ts.map +1 -1
  61. package/dist/config/env.validation.js +92 -2
  62. package/dist/config/env.validation.js.map +1 -1
  63. package/dist/config/in-memory-redis.client.d.ts +23 -4
  64. package/dist/config/in-memory-redis.client.d.ts.map +1 -1
  65. package/dist/config/in-memory-redis.client.js +148 -4
  66. package/dist/config/in-memory-redis.client.js.map +1 -1
  67. package/dist/config/redis.module.d.ts.map +1 -1
  68. package/dist/config/redis.module.js +5 -0
  69. package/dist/config/redis.module.js.map +1 -1
  70. package/dist/core.module.d.ts +5 -0
  71. package/dist/core.module.d.ts.map +1 -1
  72. package/dist/core.module.js +5 -0
  73. package/dist/core.module.js.map +1 -1
  74. package/dist/database/migrations/1785006199371-auth-mfa-oauth.d.ts +7 -0
  75. package/dist/database/migrations/1785006199371-auth-mfa-oauth.d.ts.map +1 -0
  76. package/dist/database/migrations/1785006199371-auth-mfa-oauth.js +24 -0
  77. package/dist/database/migrations/1785006199371-auth-mfa-oauth.js.map +1 -0
  78. package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.d.ts +7 -0
  79. package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.d.ts.map +1 -0
  80. package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.js +16 -0
  81. package/dist/database/migrations/1785006199372-auth-mfa-backup-codes.js.map +1 -0
  82. package/dist/database/migrations/1785006199373-auth-gap-fixes.d.ts +7 -0
  83. package/dist/database/migrations/1785006199373-auth-gap-fixes.d.ts.map +1 -0
  84. package/dist/database/migrations/1785006199373-auth-gap-fixes.js +14 -0
  85. package/dist/database/migrations/1785006199373-auth-gap-fixes.js.map +1 -0
  86. package/dist/database/migrations/1785006199374-auth-sessions-indexes.d.ts +13 -0
  87. package/dist/database/migrations/1785006199374-auth-sessions-indexes.d.ts.map +1 -0
  88. package/dist/database/migrations/1785006199374-auth-sessions-indexes.js +35 -0
  89. package/dist/database/migrations/1785006199374-auth-sessions-indexes.js.map +1 -0
  90. package/dist/database/migrations/1785006199375-auth-identity-and-audit.d.ts +11 -0
  91. package/dist/database/migrations/1785006199375-auth-identity-and-audit.d.ts.map +1 -0
  92. package/dist/database/migrations/1785006199375-auth-identity-and-audit.js +60 -0
  93. package/dist/database/migrations/1785006199375-auth-identity-and-audit.js.map +1 -0
  94. package/dist/database/migrations/1785006199376-auth-settings-security-defaults.d.ts +14 -0
  95. package/dist/database/migrations/1785006199376-auth-settings-security-defaults.d.ts.map +1 -0
  96. package/dist/database/migrations/1785006199376-auth-settings-security-defaults.js +39 -0
  97. package/dist/database/migrations/1785006199376-auth-settings-security-defaults.js.map +1 -0
  98. package/dist/database/migrations/1785006199377-auth-security-hardening.d.ts +13 -0
  99. package/dist/database/migrations/1785006199377-auth-security-hardening.d.ts.map +1 -0
  100. package/dist/database/migrations/1785006199377-auth-security-hardening.js +69 -0
  101. package/dist/database/migrations/1785006199377-auth-security-hardening.js.map +1 -0
  102. package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.d.ts +11 -0
  103. package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.d.ts.map +1 -0
  104. package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.js +51 -0
  105. package/dist/database/migrations/1785006199378-auth-family-denylist-and-hardening.js.map +1 -0
  106. package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.d.ts +12 -0
  107. package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.d.ts.map +1 -0
  108. package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.js +37 -0
  109. package/dist/database/migrations/1785006199379-authz-lifecycle-hardening.js.map +1 -0
  110. package/dist/database/migrations/1785006199380-auth-remaining-gaps.d.ts +12 -0
  111. package/dist/database/migrations/1785006199380-auth-remaining-gaps.d.ts.map +1 -0
  112. package/dist/database/migrations/1785006199380-auth-remaining-gaps.js +74 -0
  113. package/dist/database/migrations/1785006199380-auth-remaining-gaps.js.map +1 -0
  114. package/dist/database/migrations/1785006199381-settings-blast-radius.d.ts +12 -0
  115. package/dist/database/migrations/1785006199381-settings-blast-radius.d.ts.map +1 -0
  116. package/dist/database/migrations/1785006199381-settings-blast-radius.js +52 -0
  117. package/dist/database/migrations/1785006199381-settings-blast-radius.js.map +1 -0
  118. package/dist/database/migrations/1785006199382-oauth-client-ids-lock.d.ts +11 -0
  119. package/dist/database/migrations/1785006199382-oauth-client-ids-lock.d.ts.map +1 -0
  120. package/dist/database/migrations/1785006199382-oauth-client-ids-lock.js +36 -0
  121. package/dist/database/migrations/1785006199382-oauth-client-ids-lock.js.map +1 -0
  122. package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.d.ts +12 -0
  123. package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.d.ts.map +1 -0
  124. package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.js +39 -0
  125. package/dist/database/migrations/1785006199383-settings-role-and-verified-lock.js.map +1 -0
  126. package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.d.ts +12 -0
  127. package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.d.ts.map +1 -0
  128. package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.js +39 -0
  129. package/dist/database/migrations/1785006199384-settings-providers-and-test-otp-lock.js.map +1 -0
  130. package/dist/database/migrations/1785006199385-settings-auth-surface-lock.d.ts +13 -0
  131. package/dist/database/migrations/1785006199385-settings-auth-surface-lock.d.ts.map +1 -0
  132. package/dist/database/migrations/1785006199385-settings-auth-surface-lock.js +72 -0
  133. package/dist/database/migrations/1785006199385-settings-auth-surface-lock.js.map +1 -0
  134. package/dist/database/migrations/1785006199386-audit-events.d.ts +10 -0
  135. package/dist/database/migrations/1785006199386-audit-events.d.ts.map +1 -0
  136. package/dist/database/migrations/1785006199386-audit-events.js +60 -0
  137. package/dist/database/migrations/1785006199386-audit-events.js.map +1 -0
  138. package/dist/database/migrations/1785006199387-audit-resource-id-varchar.d.ts +10 -0
  139. package/dist/database/migrations/1785006199387-audit-resource-id-varchar.d.ts.map +1 -0
  140. package/dist/database/migrations/1785006199387-audit-resource-id-varchar.js +25 -0
  141. package/dist/database/migrations/1785006199387-audit-resource-id-varchar.js.map +1 -0
  142. package/dist/database/migrations/1785006199388-audit-enterprise.d.ts +11 -0
  143. package/dist/database/migrations/1785006199388-audit-enterprise.d.ts.map +1 -0
  144. package/dist/database/migrations/1785006199388-audit-enterprise.js +157 -0
  145. package/dist/database/migrations/1785006199388-audit-enterprise.js.map +1 -0
  146. package/dist/database/migrations/1785006199389-drop-admin-logs.d.ts +10 -0
  147. package/dist/database/migrations/1785006199389-drop-admin-logs.d.ts.map +1 -0
  148. package/dist/database/migrations/1785006199389-drop-admin-logs.js +38 -0
  149. package/dist/database/migrations/1785006199389-drop-admin-logs.js.map +1 -0
  150. package/dist/database/migrations/1785006199390-audit-hardening.d.ts +14 -0
  151. package/dist/database/migrations/1785006199390-audit-hardening.d.ts.map +1 -0
  152. package/dist/database/migrations/1785006199390-audit-hardening.js +345 -0
  153. package/dist/database/migrations/1785006199390-audit-hardening.js.map +1 -0
  154. package/dist/database/migrations/1785006199391-audit-owner-schema-create.d.ts +10 -0
  155. package/dist/database/migrations/1785006199391-audit-owner-schema-create.d.ts.map +1 -0
  156. package/dist/database/migrations/1785006199391-audit-owner-schema-create.js +39 -0
  157. package/dist/database/migrations/1785006199391-audit-owner-schema-create.js.map +1 -0
  158. package/dist/database/migrations/1785006199392-profile-photo-url.d.ts +11 -0
  159. package/dist/database/migrations/1785006199392-profile-photo-url.d.ts.map +1 -0
  160. package/dist/database/migrations/1785006199392-profile-photo-url.js +33 -0
  161. package/dist/database/migrations/1785006199392-profile-photo-url.js.map +1 -0
  162. package/dist/database/migrations/1785006199393-profile-cover-url.d.ts +11 -0
  163. package/dist/database/migrations/1785006199393-profile-cover-url.d.ts.map +1 -0
  164. package/dist/database/migrations/1785006199393-profile-cover-url.js +33 -0
  165. package/dist/database/migrations/1785006199393-profile-cover-url.js.map +1 -0
  166. package/dist/database/migrations/1785006199394-profile-is-public-default-false.d.ts +11 -0
  167. package/dist/database/migrations/1785006199394-profile-is-public-default-false.d.ts.map +1 -0
  168. package/dist/database/migrations/1785006199394-profile-is-public-default-false.js +24 -0
  169. package/dist/database/migrations/1785006199394-profile-is-public-default-false.js.map +1 -0
  170. package/dist/database/migrations/1785006199395-delivery-scale-indexes.d.ts +10 -0
  171. package/dist/database/migrations/1785006199395-delivery-scale-indexes.d.ts.map +1 -0
  172. package/dist/database/migrations/1785006199395-delivery-scale-indexes.js +35 -0
  173. package/dist/database/migrations/1785006199395-delivery-scale-indexes.js.map +1 -0
  174. package/dist/database/migrations/1785006199396-delivery-recipient-index.d.ts +11 -0
  175. package/dist/database/migrations/1785006199396-delivery-recipient-index.d.ts.map +1 -0
  176. package/dist/database/migrations/1785006199396-delivery-recipient-index.js +23 -0
  177. package/dist/database/migrations/1785006199396-delivery-recipient-index.js.map +1 -0
  178. package/dist/database/seeds/roles.seed.d.ts +6 -0
  179. package/dist/database/seeds/roles.seed.d.ts.map +1 -1
  180. package/dist/database/seeds/roles.seed.js +22 -5
  181. package/dist/database/seeds/roles.seed.js.map +1 -1
  182. package/dist/database/seeds/settings.seed.d.ts +5 -0
  183. package/dist/database/seeds/settings.seed.d.ts.map +1 -1
  184. package/dist/database/seeds/settings.seed.js +500 -25
  185. package/dist/database/seeds/settings.seed.js.map +1 -1
  186. package/dist/database/seeds/templates/html-template.reader.d.ts +1 -0
  187. package/dist/database/seeds/templates/html-template.reader.d.ts.map +1 -1
  188. package/dist/database/seeds/templates/html-template.reader.js +3 -1
  189. package/dist/database/seeds/templates/html-template.reader.js.map +1 -1
  190. package/dist/database/seeds/templates/html-template.reader.ts +5 -1
  191. package/dist/database/typeorm.util.d.ts.map +1 -1
  192. package/dist/database/typeorm.util.js +6 -0
  193. package/dist/database/typeorm.util.js.map +1 -1
  194. package/dist/index.d.ts +8 -1
  195. package/dist/index.d.ts.map +1 -1
  196. package/dist/index.js +39 -4
  197. package/dist/index.js.map +1 -1
  198. package/dist/modules/admin/controllers/admin.controller.d.ts +15 -7
  199. package/dist/modules/admin/controllers/admin.controller.d.ts.map +1 -1
  200. package/dist/modules/admin/controllers/admin.controller.js +74 -17
  201. package/dist/modules/admin/controllers/admin.controller.js.map +1 -1
  202. package/dist/modules/admin/services/admin-log.service.d.ts +14 -7
  203. package/dist/modules/admin/services/admin-log.service.d.ts.map +1 -1
  204. package/dist/modules/admin/services/admin-log.service.js +41 -38
  205. package/dist/modules/admin/services/admin-log.service.js.map +1 -1
  206. package/dist/modules/audit/audit.manifest.d.ts +8 -0
  207. package/dist/modules/audit/audit.manifest.d.ts.map +1 -0
  208. package/dist/modules/audit/audit.manifest.js +31 -0
  209. package/dist/modules/audit/audit.manifest.js.map +1 -0
  210. package/dist/modules/audit/audit.module.d.ts +8 -0
  211. package/dist/modules/audit/audit.module.d.ts.map +1 -0
  212. package/dist/modules/audit/audit.module.js +57 -0
  213. package/dist/modules/audit/audit.module.js.map +1 -0
  214. package/dist/modules/audit/constants/audit-actions.d.ts +79 -0
  215. package/dist/modules/audit/constants/audit-actions.d.ts.map +1 -0
  216. package/dist/modules/audit/constants/audit-actions.js +89 -0
  217. package/dist/modules/audit/constants/audit-actions.js.map +1 -0
  218. package/dist/modules/audit/constants/audit-mutation.d.ts +10 -0
  219. package/dist/modules/audit/constants/audit-mutation.d.ts.map +1 -0
  220. package/dist/modules/audit/constants/audit-mutation.js +13 -0
  221. package/dist/modules/audit/constants/audit-mutation.js.map +1 -0
  222. package/dist/modules/audit/controllers/audit.controller.d.ts +13 -0
  223. package/dist/modules/audit/controllers/audit.controller.d.ts.map +1 -0
  224. package/dist/modules/audit/controllers/audit.controller.js +149 -0
  225. package/dist/modules/audit/controllers/audit.controller.js.map +1 -0
  226. package/dist/modules/audit/decorators/audit.decorator.d.ts +27 -0
  227. package/dist/modules/audit/decorators/audit.decorator.d.ts.map +1 -0
  228. package/dist/modules/audit/decorators/audit.decorator.js +18 -0
  229. package/dist/modules/audit/decorators/audit.decorator.js.map +1 -0
  230. package/dist/modules/audit/dto/audit.dto.d.ts +54 -0
  231. package/dist/modules/audit/dto/audit.dto.d.ts.map +1 -0
  232. package/dist/modules/audit/dto/audit.dto.js +129 -0
  233. package/dist/modules/audit/dto/audit.dto.js.map +1 -0
  234. package/dist/modules/audit/entities/audit-event.entity.d.ts +33 -0
  235. package/dist/modules/audit/entities/audit-event.entity.d.ts.map +1 -0
  236. package/dist/modules/audit/entities/audit-event.entity.js +125 -0
  237. package/dist/modules/audit/entities/audit-event.entity.js.map +1 -0
  238. package/dist/modules/audit/entities/audit-outbox.entity.d.ts +16 -0
  239. package/dist/modules/audit/entities/audit-outbox.entity.d.ts.map +1 -0
  240. package/dist/modules/audit/entities/audit-outbox.entity.js +65 -0
  241. package/dist/modules/audit/entities/audit-outbox.entity.js.map +1 -0
  242. package/dist/modules/audit/index.d.ts +13 -0
  243. package/dist/modules/audit/index.d.ts.map +1 -0
  244. package/dist/modules/audit/index.js +23 -0
  245. package/dist/modules/audit/index.js.map +1 -0
  246. package/dist/modules/audit/interceptors/audit.interceptor.d.ts +11 -0
  247. package/dist/modules/audit/interceptors/audit.interceptor.d.ts.map +1 -0
  248. package/dist/modules/audit/interceptors/audit.interceptor.js +75 -0
  249. package/dist/modules/audit/interceptors/audit.interceptor.js.map +1 -0
  250. package/dist/modules/audit/listeners/auth-audit.listener.d.ts +31 -0
  251. package/dist/modules/audit/listeners/auth-audit.listener.d.ts.map +1 -0
  252. package/dist/modules/audit/listeners/auth-audit.listener.js +338 -0
  253. package/dist/modules/audit/listeners/auth-audit.listener.js.map +1 -0
  254. package/dist/modules/audit/services/audit-archive.service.d.ts +28 -0
  255. package/dist/modules/audit/services/audit-archive.service.d.ts.map +1 -0
  256. package/dist/modules/audit/services/audit-archive.service.js +132 -0
  257. package/dist/modules/audit/services/audit-archive.service.js.map +1 -0
  258. package/dist/modules/audit/services/audit-hash-backfill.service.d.ts +22 -0
  259. package/dist/modules/audit/services/audit-hash-backfill.service.d.ts.map +1 -0
  260. package/dist/modules/audit/services/audit-hash-backfill.service.js +79 -0
  261. package/dist/modules/audit/services/audit-hash-backfill.service.js.map +1 -0
  262. package/dist/modules/audit/services/audit-leader.service.d.ts +28 -0
  263. package/dist/modules/audit/services/audit-leader.service.d.ts.map +1 -0
  264. package/dist/modules/audit/services/audit-leader.service.js +99 -0
  265. package/dist/modules/audit/services/audit-leader.service.js.map +1 -0
  266. package/dist/modules/audit/services/audit-outbox.worker.d.ts +29 -0
  267. package/dist/modules/audit/services/audit-outbox.worker.d.ts.map +1 -0
  268. package/dist/modules/audit/services/audit-outbox.worker.js +144 -0
  269. package/dist/modules/audit/services/audit-outbox.worker.js.map +1 -0
  270. package/dist/modules/audit/services/audit-partition.service.d.ts +18 -0
  271. package/dist/modules/audit/services/audit-partition.service.d.ts.map +1 -0
  272. package/dist/modules/audit/services/audit-partition.service.js +70 -0
  273. package/dist/modules/audit/services/audit-partition.service.js.map +1 -0
  274. package/dist/modules/audit/services/audit-write.service.d.ts +60 -0
  275. package/dist/modules/audit/services/audit-write.service.d.ts.map +1 -0
  276. package/dist/modules/audit/services/audit-write.service.js +463 -0
  277. package/dist/modules/audit/services/audit-write.service.js.map +1 -0
  278. package/dist/modules/audit/services/audit.service.d.ts +60 -0
  279. package/dist/modules/audit/services/audit.service.d.ts.map +1 -0
  280. package/dist/modules/audit/services/audit.service.js +373 -0
  281. package/dist/modules/audit/services/audit.service.js.map +1 -0
  282. package/dist/modules/audit/utils/audit-hash.util.d.ts +20 -0
  283. package/dist/modules/audit/utils/audit-hash.util.d.ts.map +1 -0
  284. package/dist/modules/audit/utils/audit-hash.util.js +44 -0
  285. package/dist/modules/audit/utils/audit-hash.util.js.map +1 -0
  286. package/dist/modules/auth/auth-core/auth-core.module.d.ts.map +1 -1
  287. package/dist/modules/auth/auth-core/auth-core.module.js +16 -4
  288. package/dist/modules/auth/auth-core/auth-core.module.js.map +1 -1
  289. package/dist/modules/auth/auth-core/constants/jwt-redis.keys.d.ts +22 -0
  290. package/dist/modules/auth/auth-core/constants/jwt-redis.keys.d.ts.map +1 -0
  291. package/dist/modules/auth/auth-core/constants/jwt-redis.keys.js +25 -0
  292. package/dist/modules/auth/auth-core/constants/jwt-redis.keys.js.map +1 -0
  293. package/dist/modules/auth/auth-core/services/access-token.validator.d.ts +19 -0
  294. package/dist/modules/auth/auth-core/services/access-token.validator.d.ts.map +1 -0
  295. package/dist/modules/auth/auth-core/services/access-token.validator.js +110 -0
  296. package/dist/modules/auth/auth-core/services/access-token.validator.js.map +1 -0
  297. package/dist/modules/auth/auth-core/services/family-denylist.reader.d.ts +10 -0
  298. package/dist/modules/auth/auth-core/services/family-denylist.reader.d.ts.map +1 -0
  299. package/dist/modules/auth/auth-core/services/family-denylist.reader.js +44 -0
  300. package/dist/modules/auth/auth-core/services/family-denylist.reader.js.map +1 -0
  301. package/dist/modules/auth/auth-core/services/session-epoch.reader.d.ts +10 -0
  302. package/dist/modules/auth/auth-core/services/session-epoch.reader.d.ts.map +1 -0
  303. package/dist/modules/auth/auth-core/services/session-epoch.reader.js +44 -0
  304. package/dist/modules/auth/auth-core/services/session-epoch.reader.js.map +1 -0
  305. package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts +7 -8
  306. package/dist/modules/auth/auth-core/strategies/jwt.strategy.d.ts.map +1 -1
  307. package/dist/modules/auth/auth-core/strategies/jwt.strategy.js +34 -34
  308. package/dist/modules/auth/auth-core/strategies/jwt.strategy.js.map +1 -1
  309. package/dist/modules/auth/auth.manifest.d.ts +6 -0
  310. package/dist/modules/auth/auth.manifest.d.ts.map +1 -1
  311. package/dist/modules/auth/auth.manifest.js +38 -2
  312. package/dist/modules/auth/auth.manifest.js.map +1 -1
  313. package/dist/modules/auth/auth.module.d.ts.map +1 -1
  314. package/dist/modules/auth/auth.module.js +39 -4
  315. package/dist/modules/auth/auth.module.js.map +1 -1
  316. package/dist/modules/auth/controllers/account.controller.d.ts +15 -1
  317. package/dist/modules/auth/controllers/account.controller.d.ts.map +1 -1
  318. package/dist/modules/auth/controllers/account.controller.js +65 -7
  319. package/dist/modules/auth/controllers/account.controller.js.map +1 -1
  320. package/dist/modules/auth/controllers/auth.controller.d.ts +7 -3
  321. package/dist/modules/auth/controllers/auth.controller.d.ts.map +1 -1
  322. package/dist/modules/auth/controllers/auth.controller.js +76 -16
  323. package/dist/modules/auth/controllers/auth.controller.js.map +1 -1
  324. package/dist/modules/auth/controllers/forgot-password.controller.d.ts +4 -2
  325. package/dist/modules/auth/controllers/forgot-password.controller.d.ts.map +1 -1
  326. package/dist/modules/auth/controllers/forgot-password.controller.js +32 -11
  327. package/dist/modules/auth/controllers/forgot-password.controller.js.map +1 -1
  328. package/dist/modules/auth/controllers/mfa.controller.d.ts +18 -0
  329. package/dist/modules/auth/controllers/mfa.controller.d.ts.map +1 -0
  330. package/dist/modules/auth/controllers/mfa.controller.js +192 -0
  331. package/dist/modules/auth/controllers/mfa.controller.js.map +1 -0
  332. package/dist/modules/auth/controllers/oauth.controller.d.ts +22 -0
  333. package/dist/modules/auth/controllers/oauth.controller.d.ts.map +1 -0
  334. package/dist/modules/auth/controllers/oauth.controller.js +192 -0
  335. package/dist/modules/auth/controllers/oauth.controller.js.map +1 -0
  336. package/dist/modules/auth/controllers/otp.controller.d.ts +6 -3
  337. package/dist/modules/auth/controllers/otp.controller.d.ts.map +1 -1
  338. package/dist/modules/auth/controllers/otp.controller.js +32 -33
  339. package/dist/modules/auth/controllers/otp.controller.js.map +1 -1
  340. package/dist/modules/auth/controllers/pin.controller.d.ts.map +1 -1
  341. package/dist/modules/auth/controllers/pin.controller.js +10 -2
  342. package/dist/modules/auth/controllers/pin.controller.js.map +1 -1
  343. package/dist/modules/auth/controllers/session.controller.d.ts +12 -4
  344. package/dist/modules/auth/controllers/session.controller.d.ts.map +1 -1
  345. package/dist/modules/auth/controllers/session.controller.js +130 -31
  346. package/dist/modules/auth/controllers/session.controller.js.map +1 -1
  347. package/dist/modules/auth/dto/auth-config.dto.d.ts +11 -2
  348. package/dist/modules/auth/dto/auth-config.dto.d.ts.map +1 -1
  349. package/dist/modules/auth/dto/auth-config.dto.js +78 -3
  350. package/dist/modules/auth/dto/auth-config.dto.js.map +1 -1
  351. package/dist/modules/auth/dto/index.d.ts +2 -0
  352. package/dist/modules/auth/dto/index.d.ts.map +1 -1
  353. package/dist/modules/auth/dto/index.js +2 -0
  354. package/dist/modules/auth/dto/index.js.map +1 -1
  355. package/dist/modules/auth/dto/login.dto.d.ts +8 -1
  356. package/dist/modules/auth/dto/login.dto.d.ts.map +1 -1
  357. package/dist/modules/auth/dto/login.dto.js +48 -3
  358. package/dist/modules/auth/dto/login.dto.js.map +1 -1
  359. package/dist/modules/auth/dto/mfa.dto.d.ts +61 -0
  360. package/dist/modules/auth/dto/mfa.dto.d.ts.map +1 -0
  361. package/dist/modules/auth/dto/mfa.dto.js +326 -0
  362. package/dist/modules/auth/dto/mfa.dto.js.map +1 -0
  363. package/dist/modules/auth/dto/oauth.dto.d.ts +45 -0
  364. package/dist/modules/auth/dto/oauth.dto.d.ts.map +1 -0
  365. package/dist/modules/auth/dto/oauth.dto.js +249 -0
  366. package/dist/modules/auth/dto/oauth.dto.js.map +1 -0
  367. package/dist/modules/auth/dto/otp.dto.d.ts +3 -1
  368. package/dist/modules/auth/dto/otp.dto.d.ts.map +1 -1
  369. package/dist/modules/auth/dto/otp.dto.js +19 -0
  370. package/dist/modules/auth/dto/otp.dto.js.map +1 -1
  371. package/dist/modules/auth/dto/password.dto.d.ts +28 -0
  372. package/dist/modules/auth/dto/password.dto.d.ts.map +1 -1
  373. package/dist/modules/auth/dto/password.dto.js +191 -5
  374. package/dist/modules/auth/dto/password.dto.js.map +1 -1
  375. package/dist/modules/auth/dto/register.dto.d.ts +1 -0
  376. package/dist/modules/auth/dto/register.dto.d.ts.map +1 -1
  377. package/dist/modules/auth/dto/register.dto.js +1 -0
  378. package/dist/modules/auth/dto/register.dto.js.map +1 -1
  379. package/dist/modules/auth/dto/session.dto.d.ts +20 -0
  380. package/dist/modules/auth/dto/session.dto.d.ts.map +1 -0
  381. package/dist/modules/auth/dto/session.dto.js +98 -0
  382. package/dist/modules/auth/dto/session.dto.js.map +1 -0
  383. package/dist/modules/auth/dto/token.dto.d.ts +38 -1
  384. package/dist/modules/auth/dto/token.dto.d.ts.map +1 -1
  385. package/dist/modules/auth/dto/token.dto.js +21 -1
  386. package/dist/modules/auth/dto/token.dto.js.map +1 -1
  387. package/dist/modules/auth/entities/index.d.ts +2 -0
  388. package/dist/modules/auth/entities/index.d.ts.map +1 -1
  389. package/dist/modules/auth/entities/index.js +2 -0
  390. package/dist/modules/auth/entities/index.js.map +1 -1
  391. package/dist/modules/auth/entities/password-reset-token.entity.d.ts +2 -0
  392. package/dist/modules/auth/entities/password-reset-token.entity.d.ts.map +1 -1
  393. package/dist/modules/auth/entities/password-reset-token.entity.js +6 -0
  394. package/dist/modules/auth/entities/password-reset-token.entity.js.map +1 -1
  395. package/dist/modules/auth/entities/user-mfa.entity.d.ts +19 -0
  396. package/dist/modules/auth/entities/user-mfa.entity.d.ts.map +1 -0
  397. package/dist/modules/auth/entities/user-mfa.entity.js +73 -0
  398. package/dist/modules/auth/entities/user-mfa.entity.js.map +1 -0
  399. package/dist/modules/auth/entities/user-oauth-identity.entity.d.ts +24 -0
  400. package/dist/modules/auth/entities/user-oauth-identity.entity.d.ts.map +1 -0
  401. package/dist/modules/auth/entities/user-oauth-identity.entity.js +84 -0
  402. package/dist/modules/auth/entities/user-oauth-identity.entity.js.map +1 -0
  403. package/dist/modules/auth/events/auth.events.d.ts +84 -19
  404. package/dist/modules/auth/events/auth.events.d.ts.map +1 -1
  405. package/dist/modules/auth/events/auth.events.js +17 -9
  406. package/dist/modules/auth/events/auth.events.js.map +1 -1
  407. package/dist/modules/auth/services/account.service.d.ts +74 -14
  408. package/dist/modules/auth/services/account.service.d.ts.map +1 -1
  409. package/dist/modules/auth/services/account.service.js +247 -31
  410. package/dist/modules/auth/services/account.service.js.map +1 -1
  411. package/dist/modules/auth/services/dpop.service.d.ts +41 -0
  412. package/dist/modules/auth/services/dpop.service.d.ts.map +1 -0
  413. package/dist/modules/auth/services/dpop.service.js +159 -0
  414. package/dist/modules/auth/services/dpop.service.js.map +1 -0
  415. package/dist/modules/auth/services/index.d.ts +2 -0
  416. package/dist/modules/auth/services/index.d.ts.map +1 -1
  417. package/dist/modules/auth/services/index.js +2 -0
  418. package/dist/modules/auth/services/index.js.map +1 -1
  419. package/dist/modules/auth/services/legacy-hash-cleanup.service.d.ts +28 -0
  420. package/dist/modules/auth/services/legacy-hash-cleanup.service.d.ts.map +1 -0
  421. package/dist/modules/auth/services/legacy-hash-cleanup.service.js +163 -0
  422. package/dist/modules/auth/services/legacy-hash-cleanup.service.js.map +1 -0
  423. package/dist/modules/auth/services/login.service.d.ts +29 -34
  424. package/dist/modules/auth/services/login.service.d.ts.map +1 -1
  425. package/dist/modules/auth/services/login.service.js +173 -61
  426. package/dist/modules/auth/services/login.service.js.map +1 -1
  427. package/dist/modules/auth/services/mfa.service.d.ts +111 -0
  428. package/dist/modules/auth/services/mfa.service.d.ts.map +1 -0
  429. package/dist/modules/auth/services/mfa.service.js +662 -0
  430. package/dist/modules/auth/services/mfa.service.js.map +1 -0
  431. package/dist/modules/auth/services/oauth/apple-id-token.verifier.d.ts +11 -0
  432. package/dist/modules/auth/services/oauth/apple-id-token.verifier.d.ts.map +1 -0
  433. package/dist/modules/auth/services/oauth/apple-id-token.verifier.js +56 -0
  434. package/dist/modules/auth/services/oauth/apple-id-token.verifier.js.map +1 -0
  435. package/dist/modules/auth/services/oauth/google-id-token.verifier.d.ts +12 -0
  436. package/dist/modules/auth/services/oauth/google-id-token.verifier.d.ts.map +1 -0
  437. package/dist/modules/auth/services/oauth/google-id-token.verifier.js +64 -0
  438. package/dist/modules/auth/services/oauth/google-id-token.verifier.js.map +1 -0
  439. package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.d.ts +11 -0
  440. package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.d.ts.map +1 -0
  441. package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.js +76 -0
  442. package/dist/modules/auth/services/oauth/microsoft-id-token.verifier.js.map +1 -0
  443. package/dist/modules/auth/services/oauth/oidc-id-token.verifier.d.ts +16 -0
  444. package/dist/modules/auth/services/oauth/oidc-id-token.verifier.d.ts.map +1 -0
  445. package/dist/modules/auth/services/oauth/oidc-id-token.verifier.js +92 -0
  446. package/dist/modules/auth/services/oauth/oidc-id-token.verifier.js.map +1 -0
  447. package/dist/modules/auth/services/oauth/verified-oauth-identity.d.ts +9 -0
  448. package/dist/modules/auth/services/oauth/verified-oauth-identity.d.ts.map +1 -0
  449. package/dist/modules/auth/services/oauth/verified-oauth-identity.js +3 -0
  450. package/dist/modules/auth/services/oauth/verified-oauth-identity.js.map +1 -0
  451. package/dist/modules/auth/services/oauth.service.d.ts +83 -0
  452. package/dist/modules/auth/services/oauth.service.d.ts.map +1 -0
  453. package/dist/modules/auth/services/oauth.service.js +471 -0
  454. package/dist/modules/auth/services/oauth.service.js.map +1 -0
  455. package/dist/modules/auth/services/otp-auth.service.d.ts +13 -3
  456. package/dist/modules/auth/services/otp-auth.service.d.ts.map +1 -1
  457. package/dist/modules/auth/services/otp-auth.service.js +41 -7
  458. package/dist/modules/auth/services/otp-auth.service.js.map +1 -1
  459. package/dist/modules/auth/services/password-reset-audit-retention.service.d.ts +22 -0
  460. package/dist/modules/auth/services/password-reset-audit-retention.service.d.ts.map +1 -0
  461. package/dist/modules/auth/services/password-reset-audit-retention.service.js +117 -0
  462. package/dist/modules/auth/services/password-reset-audit-retention.service.js.map +1 -0
  463. package/dist/modules/auth/services/password.service.d.ts +25 -5
  464. package/dist/modules/auth/services/password.service.d.ts.map +1 -1
  465. package/dist/modules/auth/services/password.service.js +154 -20
  466. package/dist/modules/auth/services/password.service.js.map +1 -1
  467. package/dist/modules/auth/services/pin-auth.service.d.ts +10 -3
  468. package/dist/modules/auth/services/pin-auth.service.d.ts.map +1 -1
  469. package/dist/modules/auth/services/pin-auth.service.js +110 -13
  470. package/dist/modules/auth/services/pin-auth.service.js.map +1 -1
  471. package/dist/modules/auth/services/registration.service.d.ts +10 -2
  472. package/dist/modules/auth/services/registration.service.d.ts.map +1 -1
  473. package/dist/modules/auth/services/registration.service.js +113 -25
  474. package/dist/modules/auth/services/registration.service.js.map +1 -1
  475. package/dist/modules/auth/services/turnstile.service.d.ts +17 -0
  476. package/dist/modules/auth/services/turnstile.service.d.ts.map +1 -0
  477. package/dist/modules/auth/services/turnstile.service.js +94 -0
  478. package/dist/modules/auth/services/turnstile.service.js.map +1 -0
  479. package/dist/modules/auth/utils/auth-params.util.d.ts +13 -6
  480. package/dist/modules/auth/utils/auth-params.util.d.ts.map +1 -1
  481. package/dist/modules/auth/utils/auth-params.util.js +27 -4
  482. package/dist/modules/auth/utils/auth-params.util.js.map +1 -1
  483. package/dist/modules/auth/utils/auth-supported.util.d.ts +12 -1
  484. package/dist/modules/auth/utils/auth-supported.util.d.ts.map +1 -1
  485. package/dist/modules/auth/utils/auth-supported.util.js +36 -4
  486. package/dist/modules/auth/utils/auth-supported.util.js.map +1 -1
  487. package/dist/modules/auth/utils/backup-code-hash.util.d.ts +10 -0
  488. package/dist/modules/auth/utils/backup-code-hash.util.d.ts.map +1 -0
  489. package/dist/modules/auth/utils/backup-code-hash.util.js +31 -0
  490. package/dist/modules/auth/utils/backup-code-hash.util.js.map +1 -0
  491. package/dist/modules/auth/utils/backup-codes.util.d.ts +5 -0
  492. package/dist/modules/auth/utils/backup-codes.util.d.ts.map +1 -0
  493. package/dist/modules/auth/utils/backup-codes.util.js +22 -0
  494. package/dist/modules/auth/utils/backup-codes.util.js.map +1 -0
  495. package/dist/modules/auth/utils/dpop.util.d.ts +22 -0
  496. package/dist/modules/auth/utils/dpop.util.d.ts.map +1 -0
  497. package/dist/modules/auth/utils/dpop.util.js +73 -0
  498. package/dist/modules/auth/utils/dpop.util.js.map +1 -0
  499. package/dist/modules/auth/utils/mfa-secret.util.d.ts +22 -0
  500. package/dist/modules/auth/utils/mfa-secret.util.d.ts.map +1 -0
  501. package/dist/modules/auth/utils/mfa-secret.util.js +59 -0
  502. package/dist/modules/auth/utils/mfa-secret.util.js.map +1 -0
  503. package/dist/modules/auth/utils/mfa-verify-params.util.d.ts +26 -0
  504. package/dist/modules/auth/utils/mfa-verify-params.util.d.ts.map +1 -0
  505. package/dist/modules/auth/utils/mfa-verify-params.util.js +49 -0
  506. package/dist/modules/auth/utils/mfa-verify-params.util.js.map +1 -0
  507. package/dist/modules/auth/utils/step-up-purpose.util.d.ts +5 -0
  508. package/dist/modules/auth/utils/step-up-purpose.util.d.ts.map +1 -0
  509. package/dist/modules/auth/utils/step-up-purpose.util.js +18 -0
  510. package/dist/modules/auth/utils/step-up-purpose.util.js.map +1 -0
  511. package/dist/modules/auth/utils/totp.util.d.ts +16 -0
  512. package/dist/modules/auth/utils/totp.util.d.ts.map +1 -0
  513. package/dist/modules/auth/utils/totp.util.js +88 -0
  514. package/dist/modules/auth/utils/totp.util.js.map +1 -0
  515. package/dist/modules/delivery/composers/otp-delivery.composer.d.ts +28 -1
  516. package/dist/modules/delivery/composers/otp-delivery.composer.d.ts.map +1 -1
  517. package/dist/modules/delivery/composers/otp-delivery.composer.js +48 -2
  518. package/dist/modules/delivery/composers/otp-delivery.composer.js.map +1 -1
  519. package/dist/modules/delivery/constants/delivery-worker.constants.d.ts +29 -0
  520. package/dist/modules/delivery/constants/delivery-worker.constants.d.ts.map +1 -0
  521. package/dist/modules/delivery/constants/delivery-worker.constants.js +51 -0
  522. package/dist/modules/delivery/constants/delivery-worker.constants.js.map +1 -0
  523. package/dist/modules/delivery/delivery.module.d.ts.map +1 -1
  524. package/dist/modules/delivery/delivery.module.js +1 -15
  525. package/dist/modules/delivery/delivery.module.js.map +1 -1
  526. package/dist/modules/delivery/entities/notification-delivery-log.entity.d.ts.map +1 -1
  527. package/dist/modules/delivery/entities/notification-delivery-log.entity.js +3 -1
  528. package/dist/modules/delivery/entities/notification-delivery-log.entity.js.map +1 -1
  529. package/dist/modules/delivery/notification-delivery.service.d.ts +12 -1
  530. package/dist/modules/delivery/notification-delivery.service.d.ts.map +1 -1
  531. package/dist/modules/delivery/notification-delivery.service.js +121 -40
  532. package/dist/modules/delivery/notification-delivery.service.js.map +1 -1
  533. package/dist/modules/delivery/processors/delivery-job.runner.d.ts +22 -1
  534. package/dist/modules/delivery/processors/delivery-job.runner.d.ts.map +1 -1
  535. package/dist/modules/delivery/processors/delivery-job.runner.js +144 -42
  536. package/dist/modules/delivery/processors/delivery-job.runner.js.map +1 -1
  537. package/dist/modules/delivery/processors/delivery.processor.d.ts.map +1 -1
  538. package/dist/modules/delivery/processors/delivery.processor.js +6 -1
  539. package/dist/modules/delivery/processors/delivery.processor.js.map +1 -1
  540. package/dist/modules/delivery/processors/otp-delivery-job.runner.d.ts +11 -0
  541. package/dist/modules/delivery/processors/otp-delivery-job.runner.d.ts.map +1 -1
  542. package/dist/modules/delivery/processors/otp-delivery-job.runner.js +90 -16
  543. package/dist/modules/delivery/processors/otp-delivery-job.runner.js.map +1 -1
  544. package/dist/modules/delivery/processors/otp-delivery.processor.d.ts.map +1 -1
  545. package/dist/modules/delivery/processors/otp-delivery.processor.js +6 -1
  546. package/dist/modules/delivery/processors/otp-delivery.processor.js.map +1 -1
  547. package/dist/modules/delivery/queues/sync-jobs.queue.d.ts +7 -1
  548. package/dist/modules/delivery/queues/sync-jobs.queue.d.ts.map +1 -1
  549. package/dist/modules/delivery/queues/sync-jobs.queue.js +11 -2
  550. package/dist/modules/delivery/queues/sync-jobs.queue.js.map +1 -1
  551. package/dist/modules/delivery/services/delivery-audit-retention.service.d.ts +7 -3
  552. package/dist/modules/delivery/services/delivery-audit-retention.service.d.ts.map +1 -1
  553. package/dist/modules/delivery/services/delivery-audit-retention.service.js +33 -10
  554. package/dist/modules/delivery/services/delivery-audit-retention.service.js.map +1 -1
  555. package/dist/modules/delivery/services/notification-audit.service.d.ts +7 -4
  556. package/dist/modules/delivery/services/notification-audit.service.d.ts.map +1 -1
  557. package/dist/modules/delivery/services/notification-audit.service.js +83 -26
  558. package/dist/modules/delivery/services/notification-audit.service.js.map +1 -1
  559. package/dist/modules/delivery/utils/payload-snapshot.util.d.ts +2 -0
  560. package/dist/modules/delivery/utils/payload-snapshot.util.d.ts.map +1 -1
  561. package/dist/modules/delivery/utils/payload-snapshot.util.js +22 -3
  562. package/dist/modules/delivery/utils/payload-snapshot.util.js.map +1 -1
  563. package/dist/modules/file-upload/controllers/file-upload.controller.d.ts +7 -1
  564. package/dist/modules/file-upload/controllers/file-upload.controller.d.ts.map +1 -1
  565. package/dist/modules/file-upload/controllers/file-upload.controller.js +5 -7
  566. package/dist/modules/file-upload/controllers/file-upload.controller.js.map +1 -1
  567. package/dist/modules/file-upload/dto/file-upload.dto.d.ts +2 -0
  568. package/dist/modules/file-upload/dto/file-upload.dto.d.ts.map +1 -1
  569. package/dist/modules/file-upload/dto/file-upload.dto.js +20 -0
  570. package/dist/modules/file-upload/dto/file-upload.dto.js.map +1 -1
  571. package/dist/modules/file-upload/file-upload.module.d.ts.map +1 -1
  572. package/dist/modules/file-upload/file-upload.module.js +12 -2
  573. package/dist/modules/file-upload/file-upload.module.js.map +1 -1
  574. package/dist/modules/file-upload/services/file-upload.service.d.ts +24 -6
  575. package/dist/modules/file-upload/services/file-upload.service.d.ts.map +1 -1
  576. package/dist/modules/file-upload/services/file-upload.service.js +164 -36
  577. package/dist/modules/file-upload/services/file-upload.service.js.map +1 -1
  578. package/dist/modules/file-upload/services/upload-orphan-cleanup.service.d.ts +4 -2
  579. package/dist/modules/file-upload/services/upload-orphan-cleanup.service.d.ts.map +1 -1
  580. package/dist/modules/file-upload/services/upload-orphan-cleanup.service.js +30 -5
  581. package/dist/modules/file-upload/services/upload-orphan-cleanup.service.js.map +1 -1
  582. package/dist/modules/file-upload/utils/image-optimize.util.d.ts.map +1 -1
  583. package/dist/modules/file-upload/utils/image-optimize.util.js +7 -1
  584. package/dist/modules/file-upload/utils/image-optimize.util.js.map +1 -1
  585. package/dist/modules/health/health.controller.d.ts +5 -1
  586. package/dist/modules/health/health.controller.d.ts.map +1 -1
  587. package/dist/modules/health/health.controller.js +57 -3
  588. package/dist/modules/health/health.controller.js.map +1 -1
  589. package/dist/modules/invitations/controllers/invitations.controller.d.ts +19 -4
  590. package/dist/modules/invitations/controllers/invitations.controller.d.ts.map +1 -1
  591. package/dist/modules/invitations/controllers/invitations.controller.js +19 -10
  592. package/dist/modules/invitations/controllers/invitations.controller.js.map +1 -1
  593. package/dist/modules/invitations/dto/invitation.dto.d.ts +13 -0
  594. package/dist/modules/invitations/dto/invitation.dto.d.ts.map +1 -1
  595. package/dist/modules/invitations/dto/invitation.dto.js +69 -2
  596. package/dist/modules/invitations/dto/invitation.dto.js.map +1 -1
  597. package/dist/modules/invitations/services/invitations.service.d.ts +24 -6
  598. package/dist/modules/invitations/services/invitations.service.d.ts.map +1 -1
  599. package/dist/modules/invitations/services/invitations.service.js +96 -20
  600. package/dist/modules/invitations/services/invitations.service.js.map +1 -1
  601. package/dist/modules/jobs/queues/jobs.queue.d.ts +7 -2
  602. package/dist/modules/jobs/queues/jobs.queue.d.ts.map +1 -1
  603. package/dist/modules/jobs/queues/jobs.queue.js +25 -10
  604. package/dist/modules/jobs/queues/jobs.queue.js.map +1 -1
  605. package/dist/modules/notifications/controllers/notifications.controller.d.ts +3 -1
  606. package/dist/modules/notifications/controllers/notifications.controller.d.ts.map +1 -1
  607. package/dist/modules/notifications/controllers/notifications.controller.js +25 -2
  608. package/dist/modules/notifications/controllers/notifications.controller.js.map +1 -1
  609. package/dist/modules/notifications/dto/notification-query.dto.d.ts.map +1 -1
  610. package/dist/modules/notifications/dto/notification-query.dto.js +1 -0
  611. package/dist/modules/notifications/dto/notification-query.dto.js.map +1 -1
  612. package/dist/modules/notifications/entities/device-token.entity.d.ts.map +1 -1
  613. package/dist/modules/notifications/entities/device-token.entity.js +3 -1
  614. package/dist/modules/notifications/entities/device-token.entity.js.map +1 -1
  615. package/dist/modules/notifications/services/fcm.service.d.ts +2 -0
  616. package/dist/modules/notifications/services/fcm.service.d.ts.map +1 -1
  617. package/dist/modules/notifications/services/fcm.service.js +28 -7
  618. package/dist/modules/notifications/services/fcm.service.js.map +1 -1
  619. package/dist/modules/notifications/services/notifications.service.d.ts +16 -3
  620. package/dist/modules/notifications/services/notifications.service.d.ts.map +1 -1
  621. package/dist/modules/notifications/services/notifications.service.js +95 -24
  622. package/dist/modules/notifications/services/notifications.service.js.map +1 -1
  623. package/dist/modules/observability/metrics/metrics.service.d.ts +2 -0
  624. package/dist/modules/observability/metrics/metrics.service.d.ts.map +1 -1
  625. package/dist/modules/observability/metrics/metrics.service.js +11 -0
  626. package/dist/modules/observability/metrics/metrics.service.js.map +1 -1
  627. package/dist/modules/otp/constants/otp.constants.d.ts +7 -5
  628. package/dist/modules/otp/constants/otp.constants.d.ts.map +1 -1
  629. package/dist/modules/otp/constants/otp.constants.js +11 -8
  630. package/dist/modules/otp/constants/otp.constants.js.map +1 -1
  631. package/dist/modules/otp/interfaces/otp.service.interface.d.ts +1 -1
  632. package/dist/modules/otp/interfaces/otp.service.interface.d.ts.map +1 -1
  633. package/dist/modules/otp/otp.service.d.ts +10 -2
  634. package/dist/modules/otp/otp.service.d.ts.map +1 -1
  635. package/dist/modules/otp/otp.service.js +48 -4
  636. package/dist/modules/otp/otp.service.js.map +1 -1
  637. package/dist/modules/otp/services/otp.rate-limiter.d.ts +2 -0
  638. package/dist/modules/otp/services/otp.rate-limiter.d.ts.map +1 -1
  639. package/dist/modules/otp/services/otp.rate-limiter.js +19 -0
  640. package/dist/modules/otp/services/otp.rate-limiter.js.map +1 -1
  641. package/dist/modules/otp/services/otp.session.store.d.ts +9 -3
  642. package/dist/modules/otp/services/otp.session.store.d.ts.map +1 -1
  643. package/dist/modules/otp/services/otp.session.store.js +34 -42
  644. package/dist/modules/otp/services/otp.session.store.js.map +1 -1
  645. package/dist/modules/otp/utils/otp-code-hash.util.d.ts +11 -0
  646. package/dist/modules/otp/utils/otp-code-hash.util.d.ts.map +1 -0
  647. package/dist/modules/otp/utils/otp-code-hash.util.js +68 -0
  648. package/dist/modules/otp/utils/otp-code-hash.util.js.map +1 -0
  649. package/dist/modules/profile/controllers/profile.controller.d.ts +9 -3
  650. package/dist/modules/profile/controllers/profile.controller.d.ts.map +1 -1
  651. package/dist/modules/profile/controllers/profile.controller.js +140 -8
  652. package/dist/modules/profile/controllers/profile.controller.js.map +1 -1
  653. package/dist/modules/profile/dto/create-user-profile.dto.d.ts +10 -0
  654. package/dist/modules/profile/dto/create-user-profile.dto.d.ts.map +1 -1
  655. package/dist/modules/profile/dto/create-user-profile.dto.js +43 -1
  656. package/dist/modules/profile/dto/create-user-profile.dto.js.map +1 -1
  657. package/dist/modules/profile/dto/public-user-profile.dto.d.ts +24 -0
  658. package/dist/modules/profile/dto/public-user-profile.dto.d.ts.map +1 -0
  659. package/dist/modules/profile/dto/public-user-profile.dto.js +115 -0
  660. package/dist/modules/profile/dto/public-user-profile.dto.js.map +1 -0
  661. package/dist/modules/profile/dto/user-profile-response.dto.d.ts +4 -0
  662. package/dist/modules/profile/dto/user-profile-response.dto.d.ts.map +1 -1
  663. package/dist/modules/profile/dto/user-profile-response.dto.js +4 -0
  664. package/dist/modules/profile/dto/user-profile-response.dto.js.map +1 -1
  665. package/dist/modules/profile/dto/username-available.dto.d.ts +6 -0
  666. package/dist/modules/profile/dto/username-available.dto.d.ts.map +1 -0
  667. package/dist/modules/profile/dto/username-available.dto.js +31 -0
  668. package/dist/modules/profile/dto/username-available.dto.js.map +1 -0
  669. package/dist/modules/profile/entities/user-profiles.entity.d.ts +10 -0
  670. package/dist/modules/profile/entities/user-profiles.entity.d.ts.map +1 -1
  671. package/dist/modules/profile/entities/user-profiles.entity.js +29 -1
  672. package/dist/modules/profile/entities/user-profiles.entity.js.map +1 -1
  673. package/dist/modules/profile/index.d.ts +1 -0
  674. package/dist/modules/profile/index.d.ts.map +1 -1
  675. package/dist/modules/profile/index.js +1 -0
  676. package/dist/modules/profile/index.js.map +1 -1
  677. package/dist/modules/profile/profile.manifest.d.ts +2 -2
  678. package/dist/modules/profile/profile.manifest.js +2 -2
  679. package/dist/modules/profile/profile.manifest.js.map +1 -1
  680. package/dist/modules/profile/profile.module.d.ts.map +1 -1
  681. package/dist/modules/profile/profile.module.js +7 -2
  682. package/dist/modules/profile/profile.module.js.map +1 -1
  683. package/dist/modules/profile/services/profile.service.d.ts +56 -4
  684. package/dist/modules/profile/services/profile.service.d.ts.map +1 -1
  685. package/dist/modules/profile/services/profile.service.js +247 -20
  686. package/dist/modules/profile/services/profile.service.js.map +1 -1
  687. package/dist/modules/realtime/adapters/redis-io.adapter.d.ts +26 -0
  688. package/dist/modules/realtime/adapters/redis-io.adapter.d.ts.map +1 -0
  689. package/dist/modules/realtime/adapters/redis-io.adapter.js +124 -0
  690. package/dist/modules/realtime/adapters/redis-io.adapter.js.map +1 -0
  691. package/dist/modules/realtime/constants/realtime.constants.d.ts +36 -0
  692. package/dist/modules/realtime/constants/realtime.constants.d.ts.map +1 -0
  693. package/dist/modules/realtime/constants/realtime.constants.js +42 -0
  694. package/dist/modules/realtime/constants/realtime.constants.js.map +1 -0
  695. package/dist/modules/realtime/controllers/realtime.controller.d.ts +21 -0
  696. package/dist/modules/realtime/controllers/realtime.controller.d.ts.map +1 -0
  697. package/dist/modules/realtime/controllers/realtime.controller.js +113 -0
  698. package/dist/modules/realtime/controllers/realtime.controller.js.map +1 -0
  699. package/dist/modules/realtime/gateway/realtime.gateway.d.ts +42 -0
  700. package/dist/modules/realtime/gateway/realtime.gateway.d.ts.map +1 -0
  701. package/dist/modules/realtime/gateway/realtime.gateway.js +289 -0
  702. package/dist/modules/realtime/gateway/realtime.gateway.js.map +1 -0
  703. package/dist/modules/realtime/index.d.ts +12 -0
  704. package/dist/modules/realtime/index.d.ts.map +1 -0
  705. package/dist/modules/realtime/index.js +35 -0
  706. package/dist/modules/realtime/index.js.map +1 -0
  707. package/dist/modules/realtime/realtime.manifest.d.ts +8 -0
  708. package/dist/modules/realtime/realtime.manifest.d.ts.map +1 -0
  709. package/dist/modules/realtime/realtime.manifest.js +31 -0
  710. package/dist/modules/realtime/realtime.manifest.js.map +1 -0
  711. package/dist/modules/realtime/realtime.module.d.ts +14 -0
  712. package/dist/modules/realtime/realtime.module.d.ts.map +1 -0
  713. package/dist/modules/realtime/realtime.module.js +126 -0
  714. package/dist/modules/realtime/realtime.module.js.map +1 -0
  715. package/dist/modules/realtime/services/realtime-handler.registry.d.ts +16 -0
  716. package/dist/modules/realtime/services/realtime-handler.registry.d.ts.map +1 -0
  717. package/dist/modules/realtime/services/realtime-handler.registry.js +55 -0
  718. package/dist/modules/realtime/services/realtime-handler.registry.js.map +1 -0
  719. package/dist/modules/realtime/services/realtime-presence.service.d.ts +15 -0
  720. package/dist/modules/realtime/services/realtime-presence.service.d.ts.map +1 -0
  721. package/dist/modules/realtime/services/realtime-presence.service.js +86 -0
  722. package/dist/modules/realtime/services/realtime-presence.service.js.map +1 -0
  723. package/dist/modules/realtime/services/realtime-rate-limiter.service.d.ts +12 -0
  724. package/dist/modules/realtime/services/realtime-rate-limiter.service.d.ts.map +1 -0
  725. package/dist/modules/realtime/services/realtime-rate-limiter.service.js +63 -0
  726. package/dist/modules/realtime/services/realtime-rate-limiter.service.js.map +1 -0
  727. package/dist/modules/realtime/services/realtime.service.d.ts +88 -0
  728. package/dist/modules/realtime/services/realtime.service.d.ts.map +1 -0
  729. package/dist/modules/realtime/services/realtime.service.js +343 -0
  730. package/dist/modules/realtime/services/realtime.service.js.map +1 -0
  731. package/dist/modules/realtime/types/realtime.types.d.ts +50 -0
  732. package/dist/modules/realtime/types/realtime.types.d.ts.map +1 -0
  733. package/dist/modules/realtime/types/realtime.types.js +14 -0
  734. package/dist/modules/realtime/types/realtime.types.js.map +1 -0
  735. package/dist/modules/realtime/utils/handshake-error.util.d.ts +5 -0
  736. package/dist/modules/realtime/utils/handshake-error.util.d.ts.map +1 -0
  737. package/dist/modules/realtime/utils/handshake-error.util.js +45 -0
  738. package/dist/modules/realtime/utils/handshake-error.util.js.map +1 -0
  739. package/dist/modules/roles/controllers/modules.controller.d.ts +4 -3
  740. package/dist/modules/roles/controllers/modules.controller.d.ts.map +1 -1
  741. package/dist/modules/roles/controllers/modules.controller.js +21 -10
  742. package/dist/modules/roles/controllers/modules.controller.js.map +1 -1
  743. package/dist/modules/roles/controllers/permissions.controller.d.ts +4 -3
  744. package/dist/modules/roles/controllers/permissions.controller.d.ts.map +1 -1
  745. package/dist/modules/roles/controllers/permissions.controller.js +21 -10
  746. package/dist/modules/roles/controllers/permissions.controller.js.map +1 -1
  747. package/dist/modules/roles/controllers/roles.controller.d.ts +5 -4
  748. package/dist/modules/roles/controllers/roles.controller.d.ts.map +1 -1
  749. package/dist/modules/roles/controllers/roles.controller.js +26 -13
  750. package/dist/modules/roles/controllers/roles.controller.js.map +1 -1
  751. package/dist/modules/roles/controllers/user-roles.controller.d.ts +3 -2
  752. package/dist/modules/roles/controllers/user-roles.controller.d.ts.map +1 -1
  753. package/dist/modules/roles/controllers/user-roles.controller.js +14 -6
  754. package/dist/modules/roles/controllers/user-roles.controller.js.map +1 -1
  755. package/dist/modules/roles/services/modules.service.d.ts +8 -5
  756. package/dist/modules/roles/services/modules.service.d.ts.map +1 -1
  757. package/dist/modules/roles/services/modules.service.js +58 -12
  758. package/dist/modules/roles/services/modules.service.js.map +1 -1
  759. package/dist/modules/roles/services/permissions.service.d.ts +8 -5
  760. package/dist/modules/roles/services/permissions.service.d.ts.map +1 -1
  761. package/dist/modules/roles/services/permissions.service.js +61 -12
  762. package/dist/modules/roles/services/permissions.service.js.map +1 -1
  763. package/dist/modules/roles/services/roles.service.d.ts +19 -9
  764. package/dist/modules/roles/services/roles.service.d.ts.map +1 -1
  765. package/dist/modules/roles/services/roles.service.js +137 -47
  766. package/dist/modules/roles/services/roles.service.js.map +1 -1
  767. package/dist/modules/roles/services/user-roles.service.d.ts +12 -4
  768. package/dist/modules/roles/services/user-roles.service.d.ts.map +1 -1
  769. package/dist/modules/roles/services/user-roles.service.js +58 -26
  770. package/dist/modules/roles/services/user-roles.service.js.map +1 -1
  771. package/dist/modules/sessions/entities/refresh-token.entity.d.ts +7 -1
  772. package/dist/modules/sessions/entities/refresh-token.entity.d.ts.map +1 -1
  773. package/dist/modules/sessions/entities/refresh-token.entity.js +10 -0
  774. package/dist/modules/sessions/entities/refresh-token.entity.js.map +1 -1
  775. package/dist/modules/sessions/entities/revoked-refresh-family.entity.d.ts +12 -0
  776. package/dist/modules/sessions/entities/revoked-refresh-family.entity.d.ts.map +1 -0
  777. package/dist/modules/sessions/entities/revoked-refresh-family.entity.js +46 -0
  778. package/dist/modules/sessions/entities/revoked-refresh-family.entity.js.map +1 -0
  779. package/dist/modules/sessions/services/refresh-token-retention.service.d.ts +20 -0
  780. package/dist/modules/sessions/services/refresh-token-retention.service.d.ts.map +1 -0
  781. package/dist/modules/sessions/services/refresh-token-retention.service.js +97 -0
  782. package/dist/modules/sessions/services/refresh-token-retention.service.js.map +1 -0
  783. package/dist/modules/sessions/services/token.service.d.ts +150 -16
  784. package/dist/modules/sessions/services/token.service.d.ts.map +1 -1
  785. package/dist/modules/sessions/services/token.service.js +505 -74
  786. package/dist/modules/sessions/services/token.service.js.map +1 -1
  787. package/dist/modules/sessions/sessions.module.d.ts.map +1 -1
  788. package/dist/modules/sessions/sessions.module.js +4 -2
  789. package/dist/modules/sessions/sessions.module.js.map +1 -1
  790. package/dist/modules/sessions/utils/refresh-token-hash.util.d.ts +13 -0
  791. package/dist/modules/sessions/utils/refresh-token-hash.util.d.ts.map +1 -0
  792. package/dist/modules/sessions/utils/refresh-token-hash.util.js +37 -0
  793. package/dist/modules/sessions/utils/refresh-token-hash.util.js.map +1 -0
  794. package/dist/modules/settings/constants/settings.defaults.d.ts +57 -3
  795. package/dist/modules/settings/constants/settings.defaults.d.ts.map +1 -1
  796. package/dist/modules/settings/constants/settings.defaults.js +58 -3
  797. package/dist/modules/settings/constants/settings.defaults.js.map +1 -1
  798. package/dist/modules/settings/constants/settings.keys.d.ts +138 -2
  799. package/dist/modules/settings/constants/settings.keys.d.ts.map +1 -1
  800. package/dist/modules/settings/constants/settings.keys.js +140 -2
  801. package/dist/modules/settings/constants/settings.keys.js.map +1 -1
  802. package/dist/modules/settings/controllers/settings.controller.d.ts +5 -1
  803. package/dist/modules/settings/controllers/settings.controller.d.ts.map +1 -1
  804. package/dist/modules/settings/controllers/settings.controller.js +134 -5
  805. package/dist/modules/settings/controllers/settings.controller.js.map +1 -1
  806. package/dist/modules/settings/services/settings.service.d.ts +17 -7
  807. package/dist/modules/settings/services/settings.service.d.ts.map +1 -1
  808. package/dist/modules/settings/services/settings.service.js +80 -14
  809. package/dist/modules/settings/services/settings.service.js.map +1 -1
  810. package/dist/modules/settings/utils/settings-secret.util.d.ts +13 -0
  811. package/dist/modules/settings/utils/settings-secret.util.d.ts.map +1 -0
  812. package/dist/modules/settings/utils/settings-secret.util.js +80 -0
  813. package/dist/modules/settings/utils/settings-secret.util.js.map +1 -0
  814. package/dist/modules/users/controllers/users.controller.d.ts +4 -2
  815. package/dist/modules/users/controllers/users.controller.d.ts.map +1 -1
  816. package/dist/modules/users/controllers/users.controller.js +89 -10
  817. package/dist/modules/users/controllers/users.controller.js.map +1 -1
  818. package/dist/modules/users/dto/user.dto.d.ts +5 -0
  819. package/dist/modules/users/dto/user.dto.d.ts.map +1 -1
  820. package/dist/modules/users/dto/user.dto.js +46 -5
  821. package/dist/modules/users/dto/user.dto.js.map +1 -1
  822. package/dist/modules/users/entities/user.entity.d.ts +7 -1
  823. package/dist/modules/users/entities/user.entity.d.ts.map +1 -1
  824. package/dist/modules/users/entities/user.entity.js +10 -0
  825. package/dist/modules/users/entities/user.entity.js.map +1 -1
  826. package/dist/modules/users/services/users.service.d.ts +15 -2
  827. package/dist/modules/users/services/users.service.d.ts.map +1 -1
  828. package/dist/modules/users/services/users.service.js +152 -37
  829. package/dist/modules/users/services/users.service.js.map +1 -1
  830. package/dist/modules/users/users.module.d.ts.map +1 -1
  831. package/dist/modules/users/users.module.js +1 -2
  832. package/dist/modules/users/users.module.js.map +1 -1
  833. package/package.json +19 -7
  834. package/dist/modules/admin/entities/admin-log.entity.d.ts +0 -20
  835. package/dist/modules/admin/entities/admin-log.entity.d.ts.map +0 -1
  836. package/dist/modules/admin/entities/admin-log.entity.js +0 -65
  837. package/dist/modules/admin/entities/admin-log.entity.js.map +0 -1
@@ -54,6 +54,8 @@ const argon2 = __importStar(require("argon2"));
54
54
  const crypto_1 = require("crypto");
55
55
  const ioredis_1 = __importDefault(require("ioredis"));
56
56
  const redis_module_1 = require("../../../config/redis.module");
57
+ const audit_actions_1 = require("../../audit/constants/audit-actions");
58
+ const audit_service_1 = require("../../audit/services/audit.service");
57
59
  const structured_logger_service_1 = require("../../observability/logging/structured-logger.service");
58
60
  const metrics_service_1 = require("../../observability/metrics/metrics.service");
59
61
  const token_service_1 = require("../../sessions/services/token.service");
@@ -65,6 +67,8 @@ const users_service_1 = require("../../users/services/users.service");
65
67
  const auth_events_1 = require("../events/auth.events");
66
68
  const auth_params_util_1 = require("../utils/auth-params.util");
67
69
  const auth_supported_util_1 = require("../utils/auth-supported.util");
70
+ const mfa_service_1 = require("./mfa.service");
71
+ const oauth_service_1 = require("./oauth.service");
68
72
  let LoginService = class LoginService {
69
73
  usersService;
70
74
  tokenService;
@@ -73,7 +77,10 @@ let LoginService = class LoginService {
73
77
  eventEmitter;
74
78
  logger;
75
79
  metrics;
76
- constructor(usersService, tokenService, redis, settingsService, eventEmitter = null, logger, metrics) {
80
+ mfaService;
81
+ oauthService;
82
+ audit;
83
+ constructor(usersService, tokenService, redis, settingsService, eventEmitter = null, logger, metrics, mfaService, oauthService, audit) {
77
84
  this.usersService = usersService;
78
85
  this.tokenService = tokenService;
79
86
  this.redis = redis;
@@ -81,8 +88,11 @@ let LoginService = class LoginService {
81
88
  this.eventEmitter = eventEmitter;
82
89
  this.logger = logger;
83
90
  this.metrics = metrics;
91
+ this.mfaService = mfaService;
92
+ this.oauthService = oauthService;
93
+ this.audit = audit;
84
94
  }
85
- async login(dto, deviceInfo, ipAddress) {
95
+ async login(dto, deviceInfo, ipAddress, dpopJkt) {
86
96
  const mode = (0, auth_params_util_1.resolveAuthParamsMode)(dto);
87
97
  if (mode === 'ambiguous' || mode === 'missing') {
88
98
  throw new common_1.BadRequestException(auth_params_util_1.AUTH_PARAMS_ERROR);
@@ -90,42 +100,77 @@ let LoginService = class LoginService {
90
100
  const supported = (0, auth_supported_util_1.parseSupportedAuthMethods)(this.settingsService.get(settings_keys_1.SETTING_KEYS.AUTH_SUPPORTED_LOGIN_METHODS));
91
101
  (0, auth_supported_util_1.assertSupportedAuthMethod)(mode, supported, 'login');
92
102
  if ((0, auth_params_util_1.isPhoneAuthParams)(dto)) {
93
- return this.loginWithPhone(dto.verificationToken, deviceInfo, ipAddress);
103
+ return this.loginWithPhone(dto.verificationToken, deviceInfo, ipAddress, dpopJkt);
94
104
  }
95
105
  if ((0, auth_params_util_1.isEmailAuthParams)(dto)) {
96
- return this.loginWithEmail(dto.email, dto.password, deviceInfo, ipAddress);
106
+ return this.loginWithEmail(dto.email, dto.password, deviceInfo, ipAddress, dpopJkt);
107
+ }
108
+ if ((0, auth_params_util_1.isOAuthAuthParams)(dto)) {
109
+ return this.loginWithOAuth(dto.provider, dto.idToken, deviceInfo, ipAddress, dto.nonce, dpopJkt);
97
110
  }
98
111
  throw new common_1.BadRequestException(auth_params_util_1.AUTH_PARAMS_ERROR);
99
112
  }
100
113
  /**
101
114
  * Issues tokens after phone OTP verification (verify-otp bridge token).
102
115
  */
103
- async loginWithPhoneVerificationToken(verificationToken, deviceInfo, ipAddress) {
104
- return this.loginWithPhone(verificationToken, deviceInfo, ipAddress);
116
+ async loginWithPhoneVerificationToken(verificationToken, deviceInfo, ipAddress, dpopJkt) {
117
+ return this.loginWithPhone(verificationToken, deviceInfo, ipAddress, dpopJkt);
118
+ }
119
+ /**
120
+ * Continue after a verified first factor (shared by test-login email path).
121
+ * Applies MFA challenge when required.
122
+ */
123
+ async continueAfterFirstFactor(user, method, deviceInfo, ipAddress, opts) {
124
+ return this.finishAfterFirstFactor(user, method, deviceInfo, ipAddress, opts);
105
125
  }
106
126
  /**
107
- * Issues tokens for a verified user (shared by phone login and dev test-login).
127
+ * Issues tokens for a verified user (shared by phone login, MFA verify, and OAuth).
108
128
  */
109
- async completeLoginForUser(user, method, deviceInfo, ipAddress) {
129
+ async completeLoginForUser(user, method, deviceInfo, ipAddress, opts) {
110
130
  this.assertLoginMethodSupported(method);
111
131
  this.assertAccountActive(user, method, ipAddress, deviceInfo);
112
- this.assertAuthMethod(user, method, ipAddress, deviceInfo);
113
- await this.usersService.updateLastLogin(user.id);
132
+ if (!opts?.skipAuthMethodCheck) {
133
+ this.assertAuthMethod(user, method, ipAddress, deviceInfo);
134
+ }
114
135
  const tokens = await this.tokenService.generateTokens({
115
136
  user: user_dto_1.UserResponseDto.fromUser(user),
116
137
  roles: user.roles?.map((role) => role.slug) ?? [],
117
138
  ipAddress,
118
139
  deviceInfo,
140
+ dpopJkt: opts?.dpopJkt,
119
141
  });
142
+ // Throttled bookkeeping — avoid hot-row churn under high login QPS.
143
+ const minInterval = this.settingsService.get(settings_keys_1.SETTING_KEYS.LOGIN_LAST_LOGIN_MIN_INTERVAL_SECONDS);
144
+ const shouldUpdateLastLogin = !minInterval ||
145
+ minInterval <= 0 ||
146
+ !user.lastLoginAt ||
147
+ Date.now() - user.lastLoginAt.getTime() >= minInterval * 1000;
148
+ if (shouldUpdateLastLogin) {
149
+ void Promise.resolve(this.usersService.updateLastLogin(user.id)).catch((err) => {
150
+ this.logger.warn('Failed to update last login', {
151
+ event: 'auth.login.last_login_update_failed',
152
+ metadata: { userId: user.id },
153
+ err: err instanceof Error ? err : undefined,
154
+ });
155
+ });
156
+ }
120
157
  this.logSuccess({ userId: user.id, method, ipAddress, deviceInfo });
121
- await this.emitLoginCompleted({ user, method, ipAddress, deviceInfo });
158
+ await this.emitLoginCompleted({
159
+ user,
160
+ method,
161
+ ipAddress,
162
+ deviceInfo,
163
+ mfaUsed: opts?.mfaUsed === true,
164
+ amr: opts?.amr ?? [method],
165
+ oauthProvider: opts?.oauthProvider,
166
+ });
122
167
  return tokens;
123
168
  }
124
169
  // ─── Phone ────────────────────────────────────────────────────────────────
125
- async loginWithPhone(token, deviceInfo, ipAddress) {
170
+ async loginWithPhone(token, deviceInfo, ipAddress, dpopJkt) {
126
171
  const userId = await this.tokenService.verifyTemporaryToken(token).catch(() => {
127
172
  this.logFailure({
128
- method: 'phone',
173
+ method: user_entity_1.UserAuthMethod.PHONE,
129
174
  reason: 'invalid_credentials',
130
175
  ipAddress,
131
176
  deviceInfo,
@@ -135,7 +180,7 @@ let LoginService = class LoginService {
135
180
  const user = await this.usersService.findById(userId);
136
181
  if (!user) {
137
182
  this.logFailure({
138
- method: 'phone',
183
+ method: user_entity_1.UserAuthMethod.PHONE,
139
184
  reason: 'user_not_found',
140
185
  identity: userId,
141
186
  ipAddress,
@@ -143,15 +188,17 @@ let LoginService = class LoginService {
143
188
  });
144
189
  throw new common_1.UnauthorizedException('User not found');
145
190
  }
146
- return this.completeLoginForUser(user, user_entity_1.UserAuthMethod.PHONE, deviceInfo, ipAddress);
191
+ return this.finishAfterFirstFactor(user, user_entity_1.UserAuthMethod.PHONE, deviceInfo, ipAddress, {
192
+ dpopJkt,
193
+ });
147
194
  }
148
195
  // ─── Email ────────────────────────────────────────────────────────────────
149
- async loginWithEmail(email, password, deviceInfo, ipAddress) {
196
+ async loginWithEmail(email, password, deviceInfo, ipAddress, dpopJkt) {
150
197
  await this.checkIdentifierLockout(email);
151
198
  const user = await this.verifyEmailCredentials(email, password).catch(async (err) => {
152
199
  await this.recordFailedAttempt(email);
153
200
  this.logFailure({
154
- method: 'email',
201
+ method: user_entity_1.UserAuthMethod.EMAIL,
155
202
  reason: 'invalid_credentials',
156
203
  identity: email,
157
204
  ipAddress,
@@ -160,7 +207,53 @@ let LoginService = class LoginService {
160
207
  throw err;
161
208
  });
162
209
  await this.resetFailedAttempts(email);
163
- return this.completeLoginForUser(user, user_entity_1.UserAuthMethod.EMAIL, deviceInfo, ipAddress);
210
+ // Password may be an additional factor on OAuth/phone accounts (authMethod unchanged).
211
+ return this.finishAfterFirstFactor(user, user_entity_1.UserAuthMethod.EMAIL, deviceInfo, ipAddress, {
212
+ skipAuthMethodCheck: user.authMethod !== user_entity_1.UserAuthMethod.EMAIL,
213
+ dpopJkt,
214
+ });
215
+ }
216
+ // ─── OAuth ────────────────────────────────────────────────────────────────
217
+ async loginWithOAuth(provider, idToken, deviceInfo, ipAddress, nonce, dpopJkt) {
218
+ const resolved = await this.oauthService.resolveLoginUser(provider, idToken, {
219
+ nonce,
220
+ });
221
+ return this.finishAfterFirstFactor(resolved.user, user_entity_1.UserAuthMethod.OAUTH, deviceInfo, ipAddress, {
222
+ // Linked Google on an email/phone account: first factor is OAuth, primary method differs.
223
+ skipAuthMethodCheck: resolved.linkedIdentity,
224
+ provider: resolved.provider,
225
+ dpopJkt,
226
+ });
227
+ }
228
+ async finishAfterFirstFactor(user, method, deviceInfo, ipAddress, opts) {
229
+ this.assertLoginMethodSupported(method);
230
+ this.assertAccountActive(user, method, ipAddress, deviceInfo);
231
+ if (!opts?.skipAuthMethodCheck) {
232
+ this.assertAuthMethod(user, method, ipAddress, deviceInfo);
233
+ }
234
+ if (method === user_entity_1.UserAuthMethod.EMAIL &&
235
+ this.settingsService.get(settings_keys_1.SETTING_KEYS.AUTH_EMAIL_REQUIRE_VERIFIED_TO_LOGIN) ===
236
+ true &&
237
+ !user.isEmailVerified) {
238
+ this.logFailure({
239
+ method,
240
+ reason: 'email_unverified',
241
+ identity: user.id,
242
+ ipAddress,
243
+ deviceInfo,
244
+ });
245
+ throw new common_1.UnauthorizedException('Email address must be verified before signing in. Complete POST /auth/verify-email first.');
246
+ }
247
+ const challenge = await this.mfaService.issueChallengeIfRequired(user, method, opts?.provider);
248
+ if (challenge)
249
+ return challenge;
250
+ return this.completeLoginForUser(user, method, deviceInfo, ipAddress, {
251
+ skipAuthMethodCheck: true, // already checked above
252
+ mfaUsed: false,
253
+ amr: [method],
254
+ oauthProvider: opts?.provider,
255
+ dpopJkt: opts?.dpopJkt,
256
+ });
164
257
  }
165
258
  async verifyEmailCredentials(email, password) {
166
259
  const user = await this.usersService.findByEmailWithPassword(email);
@@ -175,12 +268,6 @@ let LoginService = class LoginService {
175
268
  return user;
176
269
  }
177
270
  // ─── Lifecycle hooks ────────────────────────────────────────────────────────
178
- /**
179
- * Emits {@link AUTH_EVENTS.LOGIN_COMPLETED} for consuming apps to react to
180
- * (e.g. call another service). Fire-and-forget: a failing or slow listener is
181
- * logged and never breaks the login response. No-op if the event bus is absent
182
- * (e.g. in isolated unit tests that don't import EventEmitterModule).
183
- */
184
271
  async emitLoginCompleted(args) {
185
272
  if (!this.eventEmitter)
186
273
  return;
@@ -189,30 +276,27 @@ let LoginService = class LoginService {
189
276
  user: user_dto_1.UserResponseDto.fromUser(args.user),
190
277
  roles: args.user.roles?.map((role) => role.slug) ?? [],
191
278
  method: args.method,
279
+ amr: args.amr,
280
+ mfaUsed: args.mfaUsed,
281
+ oauthProvider: args.oauthProvider,
192
282
  ipAddress: args.ipAddress,
193
283
  deviceInfo: args.deviceInfo,
194
284
  at: new Date(),
195
285
  };
196
- try {
197
- await this.eventEmitter.emitAsync(auth_events_1.AUTH_EVENTS.LOGIN_COMPLETED, payload);
198
- }
199
- catch (err) {
286
+ // Fire-and-forget: never block the login hot path on listener latency.
287
+ void this.eventEmitter.emitAsync(auth_events_1.AUTH_EVENTS.LOGIN_COMPLETED, payload).catch((err) => {
200
288
  this.logger.error('Auth login event listener failed', {
201
289
  event: 'auth.login.event_failed',
202
290
  metadata: { listener: auth_events_1.AUTH_EVENTS.LOGIN_COMPLETED },
203
291
  err: err instanceof Error ? err : undefined,
204
292
  });
205
- }
293
+ });
206
294
  }
207
295
  // ─── Guards ───────────────────────────────────────────────────────────────
208
296
  assertLoginMethodSupported(method) {
209
297
  const supported = (0, auth_supported_util_1.parseSupportedAuthMethods)(this.settingsService.get(settings_keys_1.SETTING_KEYS.AUTH_SUPPORTED_LOGIN_METHODS));
210
298
  (0, auth_supported_util_1.assertSupportedAuthMethod)(method, supported, 'login');
211
299
  }
212
- /**
213
- * Throws UnauthorizedException if the account is not allowed to log in.
214
- * Pure validation — no side effects.
215
- */
216
300
  assertAccountActive(user, method, ipAddress, deviceInfo) {
217
301
  if (!user.isActive ||
218
302
  user.status === user_entity_1.UserStatus.SUSPENDED ||
@@ -249,7 +333,9 @@ let LoginService = class LoginService {
249
333
  });
250
334
  const expected = user.authMethod === user_entity_1.UserAuthMethod.PHONE
251
335
  ? 'phone OTP authentication'
252
- : 'email and password authentication';
336
+ : user.authMethod === user_entity_1.UserAuthMethod.OAUTH
337
+ ? 'OAuth authentication'
338
+ : 'email and password authentication';
253
339
  throw new common_1.UnauthorizedException(`This account uses ${expected}. Please sign in with the correct method.`);
254
340
  }
255
341
  // ─── Audit Logging ────────────────────────────────────────────────────────
@@ -275,50 +361,72 @@ let LoginService = class LoginService {
275
361
  deviceInfo: args.deviceInfo,
276
362
  },
277
363
  });
364
+ const identityHash = args.identity
365
+ ? (0, crypto_1.createHash)('sha256')
366
+ .update(args.identity.trim().toLowerCase())
367
+ .digest('hex')
368
+ .slice(0, 16)
369
+ : undefined;
370
+ if (this.eventEmitter) {
371
+ const payload = {
372
+ method: args.method,
373
+ reason: args.reason,
374
+ identityHash,
375
+ ipAddress: args.ipAddress,
376
+ deviceInfo: args.deviceInfo,
377
+ at: new Date(),
378
+ };
379
+ void this.eventEmitter.emitAsync(auth_events_1.AUTH_EVENTS.LOGIN_FAILED, payload).catch(() => {
380
+ /* audit listener failures must not affect login response */
381
+ });
382
+ }
278
383
  }
279
- /**
280
- * Full SHA-256 hash for Redis security keys.
281
- * Not truncated — no reason to reduce the key space for a lockout store.
282
- */
283
384
  lockoutKey(identifier) {
284
385
  return `login:lockout:${(0, crypto_1.createHash)('sha256').update(identifier).digest('hex')}`;
285
386
  }
286
- // ─── Per-identifier lockout (email/password only) ─────────────────────────
287
- /**
288
- * Throws 429 if the identifier has exceeded the max failed-attempt threshold.
289
- * Fail-open when Redis is unavailable.
290
- */
291
387
  async checkIdentifierLockout(identifier) {
292
388
  const key = this.lockoutKey(identifier);
293
- const count = await this.redis.get(key);
294
- if (!count)
295
- return;
296
389
  const max = this.settingsService.get(settings_keys_1.SETTING_KEYS.LOGIN_LOCKOUT_MAX_ATTEMPTS);
297
- if (parseInt(count, 10) >= max) {
298
- const ttl = await this.redis.ttl(key);
390
+ // One round-trip: GET count + TTL when locked.
391
+ const [count, ttl] = (await this.redis.eval(`local c = redis.call('GET', KEYS[1])
392
+ if not c then return {0, -2} end
393
+ local n = tonumber(c)
394
+ if n >= tonumber(ARGV[1]) then
395
+ return {n, redis.call('TTL', KEYS[1])}
396
+ end
397
+ return {n, -1}`, 1, key, String(max)));
398
+ if (count >= max) {
299
399
  throw new common_1.HttpException({
300
400
  message: `Too many failed login attempts. Please try again in ${ttl}s.`,
301
401
  retryAfter: ttl,
302
402
  }, common_1.HttpStatus.TOO_MANY_REQUESTS);
303
403
  }
304
404
  }
305
- /**
306
- * Increments the failed-attempt counter for an identifier.
307
- * Sets a TTL on first increment; subsequent increments preserve the existing TTL
308
- * so the window doesn't reset on every failure.
309
- * Fail-silent when Redis is unavailable.
310
- */
311
405
  async recordFailedAttempt(identifier) {
312
406
  const duration = this.settingsService.get(settings_keys_1.SETTING_KEYS.LOGIN_LOCKOUT_DURATION_SECONDS);
407
+ const max = this.settingsService.get(settings_keys_1.SETTING_KEYS.LOGIN_LOCKOUT_MAX_ATTEMPTS);
313
408
  const key = this.lockoutKey(identifier);
314
- await this.redis.eval(`local n = redis.call('INCR', KEYS[1])
409
+ const count = Number(await this.redis.eval(`local n = redis.call('INCR', KEYS[1])
315
410
  if n == 1 then redis.call('EXPIRE', KEYS[1], ARGV[1]) end
316
- return n`, 1, key, String(duration));
411
+ return n`, 1, key, String(duration)));
412
+ if (Number.isFinite(count) && count === max) {
413
+ this.audit.record({
414
+ action: audit_actions_1.AUDIT_ACTIONS.LOGIN_LOCKED,
415
+ actorType: 'USER',
416
+ actorId: null,
417
+ resourceType: 'auth',
418
+ status: 'FAILURE',
419
+ metadata: {
420
+ identityHash: (0, crypto_1.createHash)('sha256')
421
+ .update(identifier.trim().toLowerCase())
422
+ .digest('hex')
423
+ .slice(0, 16),
424
+ attempts: count,
425
+ lockoutSeconds: duration,
426
+ },
427
+ });
428
+ }
317
429
  }
318
- /**
319
- * Clears the failed-attempt counter after a successful login.
320
- * Fail-silent when Redis is unavailable.
321
- */
322
430
  async resetFailedAttempts(identifier) {
323
431
  await this.redis.del(this.lockoutKey(identifier));
324
432
  }
@@ -328,10 +436,14 @@ exports.LoginService = LoginService = __decorate([
328
436
  (0, common_1.Injectable)(),
329
437
  __param(2, (0, common_1.Inject)(redis_module_1.REDIS_CLIENT)),
330
438
  __param(4, (0, common_1.Optional)()),
439
+ __param(7, (0, common_1.Inject)((0, common_1.forwardRef)(() => mfa_service_1.MfaService))),
331
440
  __metadata("design:paramtypes", [users_service_1.UsersService,
332
441
  token_service_1.TokenService,
333
442
  ioredis_1.default,
334
443
  settings_service_1.SettingsService, Object, structured_logger_service_1.StructuredLoggerService,
335
- metrics_service_1.MetricsService])
444
+ metrics_service_1.MetricsService,
445
+ mfa_service_1.MfaService,
446
+ oauth_service_1.OAuthService,
447
+ audit_service_1.AuditService])
336
448
  ], LoginService);
337
449
  //# sourceMappingURL=login.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"login.service.js","sourceRoot":"","sources":["../../../../src/modules/auth/services/login.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAQwB;AAExB,+CAAiC;AACjC,mCAAoC;AACpC,sDAA8B;AAE9B,+DAA4D;AAC5D,qGAAgG;AAChG,iFAA6E;AAC7E,yEAAqE;AACrE,0EAAsE;AACtE,+EAA2E;AAC3E,uDAA2D;AAC3D,kEAAoF;AACpF,sEAAkE;AAGlE,uDAAyF;AACzF,gEAKmC;AACnC,sEAAoG;AAG7F,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEN;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CACxC,4BAAY,CAAC,8BAA8B,CAC3C,CAAC;QACF,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAExC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CACpB;;aAEU,EACV,CAAC,EACD,GAAG,EACH,MAAM,CAAC,QAAQ,CAAC,CAChB,CAAC;IACH,CAAC;IAED;;;OAGG;IACK,KAAK,CAAC,mBAAmB,CAAC,UAAkB;QACnD,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;IACnD,CAAC;CACD,CAAA;AA7WY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;IAKV,WAAA,IAAA,eAAM,EAAC,2BAAY,CAAC,CAAA;IAGpB,WAAA,IAAA,iBAAQ,GAAE,CAAA;qCALoB,4BAAY;QACZ,4BAAY;QAEnB,iBAAO;QACG,kCAAe,UAGxB,mDAAuB;QACtB,gCAAc;GAV7B,YAAY,CA6WxB"}
1
+ {"version":3,"file":"login.service.js","sourceRoot":"","sources":["../../../../src/modules/auth/services/login.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CASwB;AAExB,+CAAiC;AACjC,mCAAoC;AACpC,sDAA8B;AAE9B,+DAA4D;AAC5D,uEAAoE;AACpE,sEAAkE;AAClE,qGAAgG;AAChG,iFAA6E;AAC7E,yEAAqE;AACrE,0EAAsE;AACtE,+EAA2E;AAC3E,uDAA2D;AAC3D,kEAAoF;AACpF,sEAAkE;AAGlE,uDAK+B;AAC/B,gEAMmC;AACnC,sEAAoG;AACpG,+CAA2C;AAC3C,mDAA+C;AAGxC,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEN;IACA;IAEA;IACA;IAEA;IACA;IACA;IAEA;IACA;IACA;IAblB,YACkB,YAA0B,EAC1B,YAA0B,EAE1B,KAAc,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C,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;yBACvC,MAAM,CAAC,KAAK,CAAC;yBACb,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;oBACd,QAAQ,EAAE,KAAK;oBACf,cAAc,EAAE,QAAQ;iBACxB;aACD,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;IAEO,KAAK,CAAC,mBAAmB,CAAC,UAAkB;QACnD,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;IACnD,CAAC;CACD,CAAA;AAhiBY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;IAKV,WAAA,IAAA,eAAM,EAAC,2BAAY,CAAC,CAAA;IAGpB,WAAA,IAAA,iBAAQ,GAAE,CAAA;IAIV,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC,CAAC,CAAA;qCATN,4BAAY;QACZ,4BAAY;QAEnB,iBAAO;QACG,kCAAe,UAGxB,mDAAuB;QACtB,gCAAc;QAEX,wBAAU;QACR,4BAAY;QACnB,4BAAY;GAdzB,YAAY,CAgiBxB"}
@@ -0,0 +1,111 @@
1
+ import { ConfigService } from '@nestjs/config';
2
+ import { EventEmitter2 } from '@nestjs/event-emitter';
3
+ import IORedis from 'ioredis';
4
+ import { DataSource, Repository } from 'typeorm';
5
+ import { AuditService } from '../../audit/services/audit.service';
6
+ import { StructuredLoggerService } from '../../observability/logging/structured-logger.service';
7
+ import { MetricsService } from '../../observability/metrics/metrics.service';
8
+ import { TokenService } from '../../sessions/services/token.service';
9
+ import { SettingsService } from '../../settings/services/settings.service';
10
+ import { User } from '../../users/entities/user.entity';
11
+ import { UsersService } from '../../users/services/users.service';
12
+ import { MfaBackupCodesResponseDto, MfaDisableDto, MfaStatusResponseDto, MfaStepUpDto, MfaStepUpResponseDto, MfaTotpConfirmDto, MfaTotpConfirmResponseDto, MfaTotpSetupResponseDto, MfaVerifyDto } from '../dto/mfa.dto';
13
+ import { MfaChallengeResponse, TokenResponse } from '../dto/token.dto';
14
+ import { UserMfa } from '../entities/user-mfa.entity';
15
+ import { OAuthProvider } from '../entities/user-oauth-identity.entity';
16
+ import type { StepUpPurpose } from '../utils/step-up-purpose.util';
17
+ import { LoginService } from './login.service';
18
+ import { OAuthService } from './oauth.service';
19
+ import { OtpAuthService } from './otp-auth.service';
20
+ /** Proof of possession for sensitive account actions. */
21
+ export type SensitiveReauthOpts = {
22
+ purpose: StepUpPurpose;
23
+ stepUpToken?: string;
24
+ password?: string;
25
+ verificationId?: string;
26
+ otp?: string;
27
+ provider?: OAuthProvider;
28
+ idToken?: string;
29
+ };
30
+ export declare class MfaService {
31
+ private readonly mfaRepo;
32
+ private readonly usersService;
33
+ private readonly tokenService;
34
+ private readonly loginService;
35
+ private readonly settingsService;
36
+ private readonly configService;
37
+ private readonly redis;
38
+ private readonly logger;
39
+ private readonly metrics;
40
+ private readonly dataSource;
41
+ private readonly otpAuthService;
42
+ private readonly oauthService;
43
+ private readonly audit;
44
+ private readonly eventEmitter;
45
+ constructor(mfaRepo: Repository<UserMfa>, usersService: UsersService, tokenService: TokenService, loginService: LoginService, settingsService: SettingsService, configService: ConfigService, redis: IORedis, logger: StructuredLoggerService, metrics: MetricsService, dataSource: DataSource, otpAuthService: OtpAuthService, oauthService: OAuthService, audit: AuditService, eventEmitter?: EventEmitter2 | null);
46
+ getStatus(userId: string): Promise<MfaStatusResponseDto>;
47
+ /**
48
+ * Whether this user must complete MFA before session tokens are issued.
49
+ * Prefer {@link issueChallengeIfRequired} on the login hot path (one query + token).
50
+ */
51
+ requiresMfa(user: User, _firstFactor: 'phone' | 'email' | 'oauth'): Promise<boolean>;
52
+ /**
53
+ * Single-query MFA gate for login: returns a challenge response or null.
54
+ * Loads backup-code availability in the same round-trip.
55
+ * Enrolled MFA always challenges (ignore required_for_methods allowlist).
56
+ */
57
+ issueChallengeIfRequired(user: User, amr: 'phone' | 'email' | 'oauth', provider?: string): Promise<MfaChallengeResponse | null>;
58
+ beginChallenge(user: User, amr: 'phone' | 'email' | 'oauth', provider?: string): Promise<MfaChallengeResponse>;
59
+ setupTotp(userId: string): Promise<MfaTotpSetupResponseDto>;
60
+ confirmTotp(userId: string, dto: MfaTotpConfirmDto): Promise<MfaTotpConfirmResponseDto>;
61
+ regenerateBackupCodes(userId: string, dto: MfaDisableDto): Promise<MfaBackupCodesResponseDto>;
62
+ disable(userId: string, dto: MfaDisableDto): Promise<MfaStatusResponseDto>;
63
+ /**
64
+ * Re-auth before enabling MFA (stolen-session cannot enroll attacker TOTP).
65
+ * Password → phone OTP → linked OAuth ID token.
66
+ */
67
+ private assertEnrollmentReauth;
68
+ /**
69
+ * Sensitive actions: never silent-pass.
70
+ * MFA enrolled → purpose-scoped step-up; otherwise first-factor proof (password / phone OTP / OAuth).
71
+ */
72
+ assertSensitiveReauth(userId: string, opts: SensitiveReauthOpts): Promise<void>;
73
+ /**
74
+ * When the user has MFA enrolled, require and consume a purpose-scoped step-up token.
75
+ * No-op when MFA is disabled — callers that need always-on re-auth should use
76
+ * {@link assertSensitiveReauth} instead.
77
+ */
78
+ consumeStepUpIfRequired(userId: string, stepUpToken: string | undefined, purpose: StepUpPurpose): Promise<void>;
79
+ /** First-factor proof when MFA is off (never silent-pass). */
80
+ private assertFirstFactorReauth;
81
+ verifyChallenge(dto: MfaVerifyDto, deviceInfo?: string, ipAddress?: string, dpopJkt?: string): Promise<TokenResponse>;
82
+ /**
83
+ * Authenticated step-up: confirm MFA again and receive a short-lived elevated token.
84
+ */
85
+ stepUp(userId: string, dto: MfaStepUpDto): Promise<MfaStepUpResponseDto>;
86
+ private issueBackupCodes;
87
+ /**
88
+ * Verify backup codes outside the DB lock, then claim under a short
89
+ * pessimistic lock by matching the stored hash string.
90
+ */
91
+ private consumeBackupCode;
92
+ /** Avoid a no-op MFA row write when lockout fields are already clear. */
93
+ private clearMfaLockoutIfNeeded;
94
+ private toStatus;
95
+ private loadMfaWithSecrets;
96
+ private assertNotLocked;
97
+ /** Increment failed attempts under a row lock so concurrent wrong codes cannot under-count. */
98
+ private recordFailedAttempt;
99
+ private assertTotpNotReplayed;
100
+ private clearTotpReplay;
101
+ /**
102
+ * Prefer dedicated MFA_ENCRYPTION_KEY; fall back to ENCRYPTION_KEY.
103
+ * Backup-code HMAC pepper uses the same material.
104
+ */
105
+ private requireMfaEncryptionKey;
106
+ private previousMfaEncryptionKey;
107
+ private mfaPeppers;
108
+ private decryptTotpSecret;
109
+ private emitMfaEvent;
110
+ }
111
+ //# sourceMappingURL=mfa.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mfa.service.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/services/mfa.service.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIjD,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAE7E,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAErE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAkB,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EACN,yBAAyB,EACzB,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,YAAY,EACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,E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