@ackplus/nest-auth 2.9.2 → 2.10.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.
- package/dist/lib/admin-console/static/index.html +1 -1
- package/dist/lib/admin-console/static/nest-auth.json +77 -1
- package/dist/lib/auth/auth.module.d.ts.map +1 -1
- package/dist/lib/auth/auth.module.js +2 -0
- package/dist/lib/auth/auth.module.js.map +1 -1
- package/dist/lib/auth/controllers/auth.controller.d.ts +2 -0
- package/dist/lib/auth/controllers/auth.controller.d.ts.map +1 -1
- package/dist/lib/auth/controllers/auth.controller.js +31 -0
- package/dist/lib/auth/controllers/auth.controller.js.map +1 -1
- package/dist/lib/auth/controllers/mfa.controller.d.ts +1 -0
- package/dist/lib/auth/controllers/mfa.controller.d.ts.map +1 -1
- package/dist/lib/auth/controllers/mfa.controller.js +2 -2
- package/dist/lib/auth/controllers/mfa.controller.js.map +1 -1
- package/dist/lib/auth/dto/requests/verify-recovery-code.request.dto.d.ts +6 -0
- package/dist/lib/auth/dto/requests/verify-recovery-code.request.dto.d.ts.map +1 -0
- package/dist/lib/auth/dto/requests/verify-recovery-code.request.dto.js +39 -0
- package/dist/lib/auth/dto/requests/verify-recovery-code.request.dto.js.map +1 -0
- package/dist/lib/auth/entities/mfa-recovery-code.entity.d.ts +10 -0
- package/dist/lib/auth/entities/mfa-recovery-code.entity.d.ts.map +1 -0
- package/dist/lib/auth/entities/mfa-recovery-code.entity.js +53 -0
- package/dist/lib/auth/entities/mfa-recovery-code.entity.js.map +1 -0
- package/dist/lib/auth/events/mfa-recovery-code-used.event.d.ts +14 -0
- package/dist/lib/auth/events/mfa-recovery-code-used.event.d.ts.map +1 -0
- package/dist/lib/auth/events/mfa-recovery-code-used.event.js +11 -0
- package/dist/lib/auth/events/mfa-recovery-code-used.event.js.map +1 -0
- package/dist/lib/auth/services/auth.service.d.ts +2 -0
- package/dist/lib/auth/services/auth.service.d.ts.map +1 -1
- package/dist/lib/auth/services/auth.service.js +60 -0
- package/dist/lib/auth/services/auth.service.js.map +1 -1
- package/dist/lib/auth/services/mfa.service.d.ts +5 -1
- package/dist/lib/auth/services/mfa.service.d.ts.map +1 -1
- package/dist/lib/auth/services/mfa.service.js +74 -25
- package/dist/lib/auth/services/mfa.service.js.map +1 -1
- package/dist/lib/auth.constants.d.ts +1 -0
- package/dist/lib/auth.constants.d.ts.map +1 -1
- package/dist/lib/auth.constants.js +1 -0
- package/dist/lib/auth.constants.js.map +1 -1
- package/dist/lib/core/entities.d.ts +3 -1
- package/dist/lib/core/entities.d.ts.map +1 -1
- package/dist/lib/core/entities.js +3 -0
- package/dist/lib/core/entities.js.map +1 -1
- package/dist/lib/core/interfaces/mfa-options.interface.d.ts +2 -0
- package/dist/lib/core/interfaces/mfa-options.interface.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -24,6 +24,7 @@ const user_access_entity_1 = require("../user/entities/user-access.entity");
|
|
|
24
24
|
const role_entity_1 = require("../role/entities/role.entity");
|
|
25
25
|
const role_permission_entity_1 = require("../role/entities/role-permission.entity");
|
|
26
26
|
const mfa_secret_entity_1 = require("../auth/entities/mfa-secret.entity");
|
|
27
|
+
const mfa_recovery_code_entity_1 = require("../auth/entities/mfa-recovery-code.entity");
|
|
27
28
|
const otp_entity_1 = require("../auth/entities/otp.entity");
|
|
28
29
|
const session_entity_1 = require("../session/entities/session.entity");
|
|
29
30
|
const permission_entity_1 = require("../permission/entities/permission.entity");
|
|
@@ -39,6 +40,7 @@ __exportStar(require("../user/entities/platform-access.entity"), exports);
|
|
|
39
40
|
__exportStar(require("../role/entities/role.entity"), exports);
|
|
40
41
|
__exportStar(require("../role/entities/role-permission.entity"), exports);
|
|
41
42
|
__exportStar(require("../auth/entities/mfa-secret.entity"), exports);
|
|
43
|
+
__exportStar(require("../auth/entities/mfa-recovery-code.entity"), exports);
|
|
42
44
|
__exportStar(require("../auth/entities/otp.entity"), exports);
|
|
43
45
|
__exportStar(require("../session/entities/session.entity"), exports);
|
|
44
46
|
__exportStar(require("../permission/entities/permission.entity"), exports);
|
|
@@ -52,6 +54,7 @@ exports.NestAuthEntities = [
|
|
|
52
54
|
platform_access_entity_1.NestAuthPlatformAccess,
|
|
53
55
|
user_access_entity_1.NestAuthUserAccess,
|
|
54
56
|
mfa_secret_entity_1.NestAuthMFASecret,
|
|
57
|
+
mfa_recovery_code_entity_1.NestAuthMfaRecoveryCode,
|
|
55
58
|
session_entity_1.NestAuthSession,
|
|
56
59
|
otp_entity_1.NestAuthOTP,
|
|
57
60
|
access_key_entity_1.NestAuthAccessKey,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../../src/lib/core/entities.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8DAA4D;AAC5D,sEAAoE;AACpE,0EAAuE;AACvE,oEAAkE;AAClE,oFAAiF;AACjF,4EAAyE;AACzE,8DAA4D;AAC5D,oFAAiF;AACjF,0EAAuE;AACvE,4DAA0D;AAC1D,uEAAqE;AACrE,gFAA8E;AAC9E,mFAAgF;AAChF,kCAAgD;AAChD,8FAA0F;AAE1F,+DAA6C;AAC7C,mEAAiD;AACjD,qEAAmD;AACnD,mEAAiD;AACjD,sEAAoD;AACpD,0EAAwD;AACxD,+DAA6C;AAC7C,0EAAwD;AACxD,qEAAmD;AACnD,8DAA4C;AAC5C,qEAAmD;AACnD,2EAAyD;AACzD,+EAA6D;AAGhD,QAAA,gBAAgB,GAAG;IAC5B,0BAAY;IACZ,kCAAgB;IAChB,0BAAY;IACZ,+CAAsB;IACtB,8BAAc;IACd,+CAAsB;IACtB,uCAAkB;IAClB,qCAAiB;IACjB,gCAAe;IACf,wBAAW;IACX,qCAAiB;IACjB,sCAAkB;IAClB,qCAAiB;IACjB,4BAAqB;IACrB,wDAA0B;CAC7B,CAAC"}
|
|
1
|
+
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../../src/lib/core/entities.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8DAA4D;AAC5D,sEAAoE;AACpE,0EAAuE;AACvE,oEAAkE;AAClE,oFAAiF;AACjF,4EAAyE;AACzE,8DAA4D;AAC5D,oFAAiF;AACjF,0EAAuE;AACvE,wFAAoF;AACpF,4DAA0D;AAC1D,uEAAqE;AACrE,gFAA8E;AAC9E,mFAAgF;AAChF,kCAAgD;AAChD,8FAA0F;AAE1F,+DAA6C;AAC7C,mEAAiD;AACjD,qEAAmD;AACnD,mEAAiD;AACjD,sEAAoD;AACpD,0EAAwD;AACxD,+DAA6C;AAC7C,0EAAwD;AACxD,qEAAmD;AACnD,4EAA0D;AAC1D,8DAA4C;AAC5C,qEAAmD;AACnD,2EAAyD;AACzD,+EAA6D;AAGhD,QAAA,gBAAgB,GAAG;IAC5B,0BAAY;IACZ,kCAAgB;IAChB,0BAAY;IACZ,+CAAsB;IACtB,8BAAc;IACd,+CAAsB;IACtB,uCAAkB;IAClB,qCAAiB;IACjB,kDAAuB;IACvB,gCAAe;IACf,wBAAW;IACX,qCAAiB;IACjB,sCAAkB;IAClB,qCAAiB;IACjB,4BAAqB;IACrB,wDAA0B;CAC7B,CAAC"}
|
|
@@ -22,5 +22,7 @@ export interface MFAOptions {
|
|
|
22
22
|
trustDeviceStorageName?: string;
|
|
23
23
|
trustedDeviceSecret?: string;
|
|
24
24
|
otp?: Pick<IOtpOptions, 'length' | 'format' | 'generate'>;
|
|
25
|
+
recoveryCodeCount?: number;
|
|
26
|
+
requireVerifiedContactForEnrollment?: boolean;
|
|
25
27
|
}
|
|
26
28
|
//# sourceMappingURL=mfa-options.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mfa-options.interface.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/interfaces/mfa-options.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;A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AAC;IAGF,GAAG,CAAC,EAAE;QACF,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KACpB,CAAC;IAGF,KAAK,CAAC,EAAE;QACJ,QAAQ,EAAE,MAAM,CAAC;KACpB,CAAC;IAGF,eAAe,CAAC,EAAE,OAAO,CAAC;IAG1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAG/B,qBAAqB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAGxC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAMhC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAG7B,GAAG,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC,CAAC;IAM1D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAO3B,mCAAmC,CAAC,EAAE,OAAO,CAAC;CAEjD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ackplus/nest-auth",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "Authentication & authorization for NestJS — JWT/cookie sessions, refresh-token rotation, RBAC, multi-tenancy, MFA, OAuth/social login, passwordless, API keys, and a built-in admin console.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"qrcode": "^1.5.0",
|
|
50
50
|
"qs": "^6.11.2",
|
|
51
51
|
"speakeasy": "^2.0.0",
|
|
52
|
-
"@ackplus/nest-auth-contracts": "2.
|
|
52
|
+
"@ackplus/nest-auth-contracts": "2.10.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@nestjs/common": "^10 || ^11",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"@types/supertest": "^6.0.2",
|
|
112
112
|
"unplugin-swc": "^1.5.0",
|
|
113
113
|
"@swc/core": "^1.7.0",
|
|
114
|
-
"@ackplus/vitest-preset": "2.
|
|
114
|
+
"@ackplus/vitest-preset": "2.10.0"
|
|
115
115
|
},
|
|
116
116
|
"scripts": {
|
|
117
117
|
"clean": "rm -rf dist tsconfig.build.tsbuildinfo",
|