@nauth-toolkit/mfa-email 0.1.3
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/LICENSE +90 -0
- package/README.md +30 -0
- package/dist/nestjs/email-mfa.module.d.ts +10 -0
- package/dist/nestjs/email-mfa.module.d.ts.map +1 -0
- package/dist/nestjs/email-mfa.module.js +58 -0
- package/dist/nestjs/email-mfa.module.js.map +1 -0
- package/dist/nestjs/index.d.ts +4 -0
- package/dist/nestjs/index.d.ts.map +1 -0
- package/dist/nestjs/index.js +22 -0
- package/dist/nestjs/index.js.map +1 -0
- package/dist/src/dto/mfa.dto.d.ts +12 -0
- package/dist/src/dto/mfa.dto.d.ts.map +1 -0
- package/dist/src/dto/mfa.dto.js +3 -0
- package/dist/src/dto/mfa.dto.js.map +1 -0
- package/dist/src/email-mfa-provider.service.d.ts +18 -0
- package/dist/src/email-mfa-provider.service.d.ts.map +1 -0
- package/dist/src/email-mfa-provider.service.js +157 -0
- package/dist/src/email-mfa-provider.service.js.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +21 -0
- package/dist/src/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +58 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
NAUTH TOOLKIT EARLY ACCESS LICENSE
|
|
2
|
+
Version 1.0 (December 2025)
|
|
3
|
+
|
|
4
|
+
================================================================================
|
|
5
|
+
FUTURE OPEN SOURCE NOTICE
|
|
6
|
+
================================================================================
|
|
7
|
+
NAuth Toolkit will transition to an open-source license (MIT or Apache 2.0) for
|
|
8
|
+
core authentication features once the project reaches production readiness.
|
|
9
|
+
|
|
10
|
+
This Early Access License is temporary and designed to:
|
|
11
|
+
• Allow developers to build with nauth-toolkit during preview/beta
|
|
12
|
+
• Provide clear expectations during the pre-release phase
|
|
13
|
+
• Enable feedback and real-world testing before GA
|
|
14
|
+
|
|
15
|
+
We're committed to keeping core auth free and open source. Premium features
|
|
16
|
+
(enterprise SSO, advanced compliance, hosted options) will be offered separately
|
|
17
|
+
under fair commercial terms.
|
|
18
|
+
|
|
19
|
+
================================================================================
|
|
20
|
+
EARLY ACCESS LICENSE TERMS
|
|
21
|
+
================================================================================
|
|
22
|
+
|
|
23
|
+
1. Grant of Use
|
|
24
|
+
You are granted a free, non-exclusive, non-transferable license to:
|
|
25
|
+
- Install and use nauth-toolkit packages in development, testing, staging,
|
|
26
|
+
and production environments
|
|
27
|
+
- Modify the code for your own internal use
|
|
28
|
+
- Deploy applications using nauth-toolkit to serve your users
|
|
29
|
+
|
|
30
|
+
You may NOT:
|
|
31
|
+
- Redistribute NAuth Toolkit as a standalone product or service
|
|
32
|
+
- Sell, sublicense, or offer NAuth Toolkit as part of a competing auth
|
|
33
|
+
platform or toolkit
|
|
34
|
+
- Remove or alter copyright notices
|
|
35
|
+
|
|
36
|
+
2. No Fees During Early Access
|
|
37
|
+
There are no license fees, subscription costs, or usage charges during the
|
|
38
|
+
Early Access period. You may use nauth-toolkit freely for commercial and
|
|
39
|
+
non-commercial purposes within the terms of this license.
|
|
40
|
+
|
|
41
|
+
3. Production Use
|
|
42
|
+
Production use is permitted but comes with standard early-access caveats:
|
|
43
|
+
- Features and APIs may change between preview releases
|
|
44
|
+
- Support is community-based (GitHub issues/discussions)
|
|
45
|
+
- No SLA or guaranteed uptime (you run it on your infrastructure)
|
|
46
|
+
|
|
47
|
+
We recommend thorough testing and having rollback plans for critical systems.
|
|
48
|
+
|
|
49
|
+
4. Future Transition
|
|
50
|
+
When nauth-toolkit releases v1.0 GA:
|
|
51
|
+
- Core packages will adopt an open-source license (MIT or Apache 2.0)
|
|
52
|
+
- Your existing deployments will continue to work
|
|
53
|
+
- Premium features (if any) will be clearly documented with separate licensing
|
|
54
|
+
- No forced upgrades or surprise fees
|
|
55
|
+
|
|
56
|
+
5. Ownership
|
|
57
|
+
NAuth Toolkit is developed and maintained by Noorix Digital Solutions.
|
|
58
|
+
You retain full ownership of your applications and data.
|
|
59
|
+
|
|
60
|
+
6. Data and Privacy
|
|
61
|
+
NAuth Toolkit runs in YOUR infrastructure and database. You control all data.
|
|
62
|
+
You are responsible for compliance with applicable data protection laws.
|
|
63
|
+
|
|
64
|
+
7. Disclaimer of Warranty
|
|
65
|
+
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
66
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
67
|
+
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
|
68
|
+
|
|
69
|
+
8. Limitation of Liability
|
|
70
|
+
IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
|
|
71
|
+
SPECIAL, CONSEQUENTIAL, OR EXEMPLARY DAMAGES, INCLUDING BUT NOT LIMITED TO LOSS
|
|
72
|
+
OF PROFITS, REVENUE, DATA, OR USE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
|
73
|
+
DAMAGES.
|
|
74
|
+
|
|
75
|
+
9. Termination
|
|
76
|
+
This license remains in effect until:
|
|
77
|
+
- You stop using nauth-toolkit, or
|
|
78
|
+
- The project transitions to open source (at which point the new license applies)
|
|
79
|
+
|
|
80
|
+
If you breach these terms, your license terminates and you must stop using the
|
|
81
|
+
software.
|
|
82
|
+
|
|
83
|
+
10. Contact and Support
|
|
84
|
+
- Documentation: https://nauth.dev
|
|
85
|
+
- Issues/Discussions: GitHub (when public repository launches)
|
|
86
|
+
- Commercial inquiries: Contact admin@noorix.com
|
|
87
|
+
|
|
88
|
+
================================================================================
|
|
89
|
+
Thank you for being an early adopter. Your feedback shapes the future of NAuth.
|
|
90
|
+
================================================================================
|
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# @nauth-toolkit/mfa-email
|
|
2
|
+
|
|
3
|
+
Email MFA provider for nauth-toolkit
|
|
4
|
+
|
|
5
|
+
## ⚠️ Preview Release Notice
|
|
6
|
+
|
|
7
|
+
**This is a preview release for internal testing. Do not use in production yet.**
|
|
8
|
+
|
|
9
|
+
This package is part of nauth-toolkit and is currently in early access/preview. Features and APIs may change between releases. For production use, please wait for the stable v1.0 release.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @nauth-toolkit/mfa-email@preview
|
|
15
|
+
# or
|
|
16
|
+
yarn add @nauth-toolkit/mfa-email@preview
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## License
|
|
20
|
+
|
|
21
|
+
See LICENSE file in the package root for full license terms.
|
|
22
|
+
|
|
23
|
+
## Documentation
|
|
24
|
+
|
|
25
|
+
Full documentation: https://nauth.dev
|
|
26
|
+
|
|
27
|
+
## Support
|
|
28
|
+
|
|
29
|
+
- Issues/Discussions: GitHub (when repository is public)
|
|
30
|
+
- Documentation: https://nauth.dev
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OnModuleInit } from '@nestjs/common';
|
|
2
|
+
import { EmailMFAProviderService } from '../src/email-mfa-provider.service';
|
|
3
|
+
import { MFAService } from '@nauth-toolkit/core';
|
|
4
|
+
export declare class EmailMFAModule implements OnModuleInit {
|
|
5
|
+
private readonly emailMFAProvider;
|
|
6
|
+
private readonly mfaService;
|
|
7
|
+
constructor(emailMFAProvider: EmailMFAProviderService, mfaService: MFAService);
|
|
8
|
+
onModuleInit(): void;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=email-mfa.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-mfa.module.d.ts","sourceRoot":"","sources":["../../nestjs/email-mfa.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAyE,MAAM,qBAAqB,CAAC;AA0BxH,qBA2Ca,cAAe,YAAW,YAAY;IAE/C,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU;gBADV,gBAAgB,EAAE,uBAAuB,EACzC,UAAU,EAAE,UAAU;IAMzC,YAAY,IAAI,IAAI;CAMrB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EmailMFAModule = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const email_mfa_provider_service_1 = require("../src/email-mfa-provider.service");
|
|
15
|
+
const core_1 = require("@nauth-toolkit/core");
|
|
16
|
+
const internal_1 = require("@nauth-toolkit/core/internal");
|
|
17
|
+
let EmailMFAModule = class EmailMFAModule {
|
|
18
|
+
emailMFAProvider;
|
|
19
|
+
mfaService;
|
|
20
|
+
constructor(emailMFAProvider, mfaService) {
|
|
21
|
+
this.emailMFAProvider = emailMFAProvider;
|
|
22
|
+
this.mfaService = mfaService;
|
|
23
|
+
}
|
|
24
|
+
onModuleInit() {
|
|
25
|
+
if (!this.mfaService) {
|
|
26
|
+
throw new Error('MFAService is not available. Ensure AuthModule.forRoot() is imported before EmailMFAModule.');
|
|
27
|
+
}
|
|
28
|
+
this.mfaService.registerProvider(this.emailMFAProvider);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.EmailMFAModule = EmailMFAModule;
|
|
32
|
+
exports.EmailMFAModule = EmailMFAModule = __decorate([
|
|
33
|
+
(0, common_1.Module)({
|
|
34
|
+
providers: [
|
|
35
|
+
{
|
|
36
|
+
provide: email_mfa_provider_service_1.EmailMFAProviderService,
|
|
37
|
+
useFactory: (mfaDeviceRepository, userRepository, config, logger, passwordService, emailVerificationService, challengeService, auditService, clientInfoService) => {
|
|
38
|
+
return new email_mfa_provider_service_1.EmailMFAProviderService(mfaDeviceRepository, userRepository, config, logger, passwordService, emailVerificationService, challengeService, auditService, clientInfoService);
|
|
39
|
+
},
|
|
40
|
+
inject: [
|
|
41
|
+
'MFADeviceRepository',
|
|
42
|
+
'UserRepository',
|
|
43
|
+
'NAUTH_CONFIG',
|
|
44
|
+
'NAUTH_LOGGER',
|
|
45
|
+
{ token: internal_1.PasswordService, optional: true },
|
|
46
|
+
{ token: core_1.EmailVerificationService, optional: true },
|
|
47
|
+
{ token: 'ChallengeService', optional: true },
|
|
48
|
+
{ token: internal_1.AuthAuditService, optional: true },
|
|
49
|
+
{ token: core_1.ClientInfoService, optional: true },
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
exports: [email_mfa_provider_service_1.EmailMFAProviderService],
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:paramtypes", [email_mfa_provider_service_1.EmailMFAProviderService,
|
|
56
|
+
core_1.MFAService])
|
|
57
|
+
], EmailMFAModule);
|
|
58
|
+
//# sourceMappingURL=email-mfa.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-mfa.module.js","sourceRoot":"","sources":["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EAAE,IAAI,EAAE;oBACnD,EAAE,KAAK,EAAE,wBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE;iBAC7C;aACF;SACF;QACD,OAAO,EAAE,CAAC,oDAAuB,CAAC;KACnC,CAAC;qCAGqC,oDAAuB;QAC7B,iBAAU;GAH9B,cAAc,CAe1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../nestjs/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.EmailMFAModule = void 0;
|
|
18
|
+
var email_mfa_module_1 = require("./email-mfa.module");
|
|
19
|
+
Object.defineProperty(exports, "EmailMFAModule", { enumerable: true, get: function () { return email_mfa_module_1.EmailMFAModule; } });
|
|
20
|
+
__exportStar(require("../src/email-mfa-provider.service"), exports);
|
|
21
|
+
__exportStar(require("../src/dto/mfa.dto"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../nestjs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAMA,uDAAoD;AAA3C,kHAAA,cAAc,OAAA;AAGvB,oEAAkD;AAClD,qDAAmC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface SetupEmailMFADTO {
|
|
2
|
+
email: string;
|
|
3
|
+
deviceName?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface VerifyEmailMFASetupDTO {
|
|
6
|
+
email: string;
|
|
7
|
+
code: string;
|
|
8
|
+
}
|
|
9
|
+
export interface SendEmailMFACodeDTO {
|
|
10
|
+
session: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=mfa.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mfa.dto.d.ts","sourceRoot":"","sources":["../../../src/dto/mfa.dto.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,gBAAgB;IAM/B,KAAK,EAAE,MAAM,CAAC;IAMd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAeD,MAAM,WAAW,sBAAsB;IAIrC,KAAK,EAAE,MAAM,CAAC;IAKd,IAAI,EAAE,MAAM,CAAC;CACd;AAcD,MAAM,WAAW,mBAAmB;IAIlC,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mfa.dto.js","sourceRoot":"","sources":["../../../src/dto/mfa.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import { BaseMFADevice, BaseUser, IUser, NAuthConfig, NAuthLogger, EmailVerificationService, MFAMethod } from '@nauth-toolkit/core';
|
|
3
|
+
import { BaseMFAProviderService } from '@nauth-toolkit/core/internal';
|
|
4
|
+
export declare class EmailMFAProviderService extends BaseMFAProviderService {
|
|
5
|
+
private readonly emailVerificationService?;
|
|
6
|
+
readonly methodName = MFAMethod.EMAIL;
|
|
7
|
+
constructor(mfaDeviceRepository: Repository<BaseMFADevice>, userRepository: Repository<BaseUser>, config: NAuthConfig, logger: NAuthLogger, passwordService: unknown, emailVerificationService?: EmailVerificationService | undefined, challengeService?: unknown, auditService?: unknown, clientInfoService?: unknown);
|
|
8
|
+
setup(user: IUser, setupData?: unknown): Promise<{
|
|
9
|
+
deviceId: number;
|
|
10
|
+
autoCompleted: true;
|
|
11
|
+
} | {
|
|
12
|
+
maskedEmail: string;
|
|
13
|
+
}>;
|
|
14
|
+
verifySetup(user: IUser, verificationData: unknown, deviceName?: string): Promise<number>;
|
|
15
|
+
verify(user: IUser, code: unknown, deviceId?: number): Promise<boolean>;
|
|
16
|
+
sendChallenge(user: IUser): Promise<string>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=email-mfa-provider.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-mfa-provider.service.d.ts","sourceRoot":"","sources":["../../src/email-mfa-provider.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EACL,aAAa,EACb,QAAQ,EACR,KAAK,EACL,WAAW,EACX,WAAW,EAGX,wBAAwB,EACxB,SAAS,EAGV,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAwBtE,qBAAa,uBAAwB,SAAQ,sBAAsB;IAS/D,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IAR5C,QAAQ,CAAC,UAAU,mBAAmB;gBAGpC,mBAAmB,EAAE,UAAU,CAAC,aAAa,CAAC,EAC9C,cAAc,EAAE,UAAU,CAAC,QAAQ,CAAC,EACpC,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,eAAe,EAAE,OAAO,EACP,wBAAwB,CAAC,EAAE,wBAAwB,YAAA,EACpE,gBAAgB,CAAC,EAAE,OAAO,EAC1B,YAAY,CAAC,EAAE,OAAO,EACtB,iBAAiB,CAAC,EAAE,OAAO;IAmCvB,KAAK,CACT,IAAI,EAAE,KAAK,EACX,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,IAAI,CAAA;KAAE,GAAG;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IA2FzE,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAmGzF,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAkFvE,aAAa,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;CA4ClD"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailMFAProviderService = void 0;
|
|
4
|
+
const core_1 = require("@nauth-toolkit/core");
|
|
5
|
+
const internal_1 = require("@nauth-toolkit/core/internal");
|
|
6
|
+
class EmailMFAProviderService extends internal_1.BaseMFAProviderService {
|
|
7
|
+
emailVerificationService;
|
|
8
|
+
methodName = core_1.MFAMethod.EMAIL;
|
|
9
|
+
constructor(mfaDeviceRepository, userRepository, config, logger, passwordService, emailVerificationService, challengeService, auditService, clientInfoService) {
|
|
10
|
+
super(mfaDeviceRepository, userRepository, config, logger, passwordService, challengeService, auditService, clientInfoService);
|
|
11
|
+
this.emailVerificationService = emailVerificationService;
|
|
12
|
+
}
|
|
13
|
+
async setup(user, setupData) {
|
|
14
|
+
this.logger?.log?.(`Setting up Email MFA for user: ${user.sub}`);
|
|
15
|
+
if (!this.isMethodAllowed()) {
|
|
16
|
+
throw new core_1.NAuthException(core_1.AuthErrorCode.VALIDATION_FAILED, 'Email MFA is not enabled', { feature: 'email-mfa' });
|
|
17
|
+
}
|
|
18
|
+
const dto = setupData;
|
|
19
|
+
const userEntity = user;
|
|
20
|
+
const isEmailVerified = userEntity.isEmailVerified || false;
|
|
21
|
+
const email = dto?.email || userEntity.email;
|
|
22
|
+
if (!email) {
|
|
23
|
+
throw new core_1.NAuthException(core_1.AuthErrorCode.VALIDATION_FAILED, 'Email address is required for Email MFA setup. Please provide an email address.');
|
|
24
|
+
}
|
|
25
|
+
if (isEmailVerified) {
|
|
26
|
+
this.logger?.log?.(`Email already verified for user ${user.sub}, auto-completing Email MFA setup`);
|
|
27
|
+
const deviceId = await this.verifySetup(user, {
|
|
28
|
+
email,
|
|
29
|
+
code: '',
|
|
30
|
+
}, dto?.deviceName);
|
|
31
|
+
return { deviceId, autoCompleted: true };
|
|
32
|
+
}
|
|
33
|
+
if (!this.emailVerificationService) {
|
|
34
|
+
throw new core_1.NAuthException(core_1.AuthErrorCode.VALIDATION_FAILED, 'Email verification service is not available. Email provider must be configured.');
|
|
35
|
+
}
|
|
36
|
+
const sendDto = new core_1.SendVerificationEmailDTO();
|
|
37
|
+
sendDto.sub = user.sub;
|
|
38
|
+
const setupDataWithSession = setupData;
|
|
39
|
+
if (setupDataWithSession?.challengeSessionId) {
|
|
40
|
+
sendDto.challengeSessionId = setupDataWithSession.challengeSessionId;
|
|
41
|
+
}
|
|
42
|
+
await this.emailVerificationService.sendVerificationEmail(sendDto);
|
|
43
|
+
const maskedEmail = this.maskEmail(email);
|
|
44
|
+
this.logger?.log?.(`Email MFA code sent to: ${maskedEmail}`);
|
|
45
|
+
return { maskedEmail };
|
|
46
|
+
}
|
|
47
|
+
async verifySetup(user, verificationData, deviceName) {
|
|
48
|
+
this.logger?.log?.(`Verifying Email MFA setup for user: ${user.sub}`);
|
|
49
|
+
const dto = verificationData;
|
|
50
|
+
const userEntity = user;
|
|
51
|
+
const userId = userEntity.id;
|
|
52
|
+
const userMfaEnabled = userEntity.mfaEnabled || false;
|
|
53
|
+
const isEmailVerified = userEntity.isEmailVerified || false;
|
|
54
|
+
const email = dto.email || userEntity.email;
|
|
55
|
+
if (!email) {
|
|
56
|
+
throw new core_1.NAuthException(core_1.AuthErrorCode.VALIDATION_FAILED, 'Email address is required for Email MFA setup. Please provide an email address.');
|
|
57
|
+
}
|
|
58
|
+
if (!isEmailVerified) {
|
|
59
|
+
if (!this.emailVerificationService) {
|
|
60
|
+
throw new core_1.NAuthException(core_1.AuthErrorCode.VALIDATION_FAILED, 'Email verification service is not available. Email provider must be configured.');
|
|
61
|
+
}
|
|
62
|
+
if (!dto.code || dto.code.trim() === '') {
|
|
63
|
+
throw new core_1.NAuthException(core_1.AuthErrorCode.VALIDATION_FAILED, 'Verification code is required');
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
const verifyDto = new core_1.VerifyEmailWithCodeDTO();
|
|
67
|
+
verifyDto.email = user.email;
|
|
68
|
+
verifyDto.code = dto.code;
|
|
69
|
+
await this.emailVerificationService.verifyEmailWithCode(verifyDto);
|
|
70
|
+
this.logger?.log?.(`Email verified during Email MFA setup for user ${user.sub} - email is now marked as verified in database`);
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
74
|
+
this.logger?.error?.(`Failed to verify email during Email MFA setup for user ${user.sub}: ${errorMessage}`, error);
|
|
75
|
+
throw new core_1.NAuthException(core_1.AuthErrorCode.VERIFICATION_CODE_INVALID, 'Invalid Email code');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
this.logger?.log?.(`Email already verified for user ${user.sub}, skipping Email code verification during MFA setup`);
|
|
80
|
+
}
|
|
81
|
+
const device = await this.createDevice(userId, {
|
|
82
|
+
name: deviceName || 'Email',
|
|
83
|
+
email,
|
|
84
|
+
isActive: true,
|
|
85
|
+
isPrimary: !userMfaEnabled,
|
|
86
|
+
});
|
|
87
|
+
await this.enableMFAForUser(user);
|
|
88
|
+
this.logger?.log?.(`Email MFA setup completed for user: ${user.sub}`);
|
|
89
|
+
return device.id;
|
|
90
|
+
}
|
|
91
|
+
async verify(user, code, deviceId) {
|
|
92
|
+
this.logger?.log?.(`Verifying Email code for user: ${user.sub}`);
|
|
93
|
+
if (!this.emailVerificationService) {
|
|
94
|
+
this.logger?.warn?.('Email verification attempted but email verification service is not available');
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
const emailCode = code;
|
|
98
|
+
if (!emailCode || typeof emailCode !== 'string') {
|
|
99
|
+
this.logger?.warn?.('Invalid Email code format');
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
const userEntity = user;
|
|
103
|
+
const userId = userEntity.id;
|
|
104
|
+
const isEmailVerified = userEntity.isEmailVerified || false;
|
|
105
|
+
const device = deviceId ? await this.findDevice(userId, deviceId) : null;
|
|
106
|
+
try {
|
|
107
|
+
const verifyDto = new core_1.VerifyEmailWithCodeDTO();
|
|
108
|
+
verifyDto.email = user.email;
|
|
109
|
+
verifyDto.code = emailCode;
|
|
110
|
+
await this.emailVerificationService.verifyEmailWithCode(verifyDto);
|
|
111
|
+
if (!isEmailVerified) {
|
|
112
|
+
this.logger?.log?.(`Email code verified and email marked as verified during MFA for user: ${user.sub}`);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
this.logger?.log?.(`Email code verified for MFA (email already verified) for user: ${user.sub}`);
|
|
116
|
+
}
|
|
117
|
+
if (device) {
|
|
118
|
+
await this.updateDeviceUsage(device.id);
|
|
119
|
+
}
|
|
120
|
+
this.logger?.log?.(`Email code verified successfully for user: ${user.sub}`);
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
if (error instanceof core_1.NAuthException) {
|
|
125
|
+
throw error;
|
|
126
|
+
}
|
|
127
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
128
|
+
const errorCode = error?.code || 'UNKNOWN';
|
|
129
|
+
this.logger?.warn?.(`Email code verification failed for user: ${user.sub}, code: ${emailCode}, error: ${errorCode} - ${errorMessage}`);
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
async sendChallenge(user) {
|
|
134
|
+
this.logger?.log?.(`Sending Email MFA code for user: ${user.sub}`);
|
|
135
|
+
const userEntity = user;
|
|
136
|
+
const userId = userEntity.id;
|
|
137
|
+
const device = await this.findDevice(userId);
|
|
138
|
+
if (!device) {
|
|
139
|
+
throw new core_1.NAuthException(core_1.AuthErrorCode.NOT_FOUND, 'No Email device registered', { deviceType: 'email' });
|
|
140
|
+
}
|
|
141
|
+
const emailAddress = device.email || user.email;
|
|
142
|
+
if (!emailAddress) {
|
|
143
|
+
throw new core_1.NAuthException(core_1.AuthErrorCode.VALIDATION_FAILED, 'No email address found for Email MFA. Please update your profile or re-setup Email MFA.', { deviceType: 'email' });
|
|
144
|
+
}
|
|
145
|
+
if (!this.emailVerificationService) {
|
|
146
|
+
throw new core_1.NAuthException(core_1.AuthErrorCode.VALIDATION_FAILED, 'Email verification service is not available. Email provider must be configured.');
|
|
147
|
+
}
|
|
148
|
+
const sendDto = new core_1.SendVerificationEmailDTO();
|
|
149
|
+
sendDto.sub = user.sub;
|
|
150
|
+
sendDto.skipAlreadyVerifiedCheck = true;
|
|
151
|
+
await this.emailVerificationService.sendVerificationEmail(sendDto);
|
|
152
|
+
this.logger?.log?.(`Email MFA code sent for user: ${user.sub}`);
|
|
153
|
+
return this.maskEmail(emailAddress);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
exports.EmailMFAProviderService = EmailMFAProviderService;
|
|
157
|
+
//# sourceMappingURL=email-mfa-provider.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-mfa-provider.service.js","sourceRoot":"","sources":["../../src/email-mfa-provider.service.ts"],"names":[],"mappings":";;;AAEA,8CAY6B;AAE7B,2DAAsE;AAwBtE,MAAa,uBAAwB,SAAQ,iCAAsB;IAS9C;IARV,UAAU,GAAG,gBAAS,CAAC,KAAK,CAAC;IAEtC,YACE,mBAA8C,EAC9C,cAAoC,EACpC,MAAmB,EACnB,MAAmB,EACnB,eAAwB,EACP,wBAAmD,EACpE,gBAA0B,EAC1B,YAAsB,EACtB,iBAA2B;QAE3B,KAAK,CACH,mBAAmB,EACnB,cAAc,EACd,MAAM,EACN,MAAM,EACN,eAAe,EACf,gBAAuB,EACvB,YAAmB,EACnB,iBAAwB,CACzB,CAAC;QAde,6BAAwB,GAAxB,wBAAwB,CAA2B;IAetE,CAAC;IAuBD,KAAK,CAAC,KAAK,CACT,IAAW,EACX,SAAmB;QAEnB,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,kCAAkC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAGjE,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC;YAC5B,MAAM,IAAI,qBAAc,CAAC,oBAAa,CAAC,iBAAiB,EAAE,0BAA0B,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;QAClH,CAAC;QAED,MAAM,GAAG,GAAG,SAAyC,CAAC;QACtD,MAAM,UAAU,GAAG,IAA0C,CAAC;QAC9D,MAAM,eAAe,GAAI,UAAU,CAAC,eAA2B,IAAI,KAAK,CAAC;QAGzE,MAAM,KAAK,GAAG,GAAG,EAAE,KAAK,IAAK,UAAU,CAAC,KAA4B,CAAC;QAErE,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,qBAAc,CACtB,oBAAa,CAAC,iBAAiB,EAC/B,iFAAiF,CAClF,CAAC;QACJ,CAAC;QAMD,IAAI,eAAe,EAAE,CAAC;YACpB,IAAI,CAAC,MAAM,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AwB,GAAG,IAAI,CAAC;QACxC,MAAM,IAAI,CAAC,wBAAwB,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAEnE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,iCAAiC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAEhE,OAAO,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IACtC,CAAC;CACF;AA9WD,0DA8WC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.EmailMFAProviderService = void 0;
|
|
18
|
+
var email_mfa_provider_service_1 = require("./email-mfa-provider.service");
|
|
19
|
+
Object.defineProperty(exports, "EmailMFAProviderService", { enumerable: true, get: function () { return email_mfa_provider_service_1.EmailMFAProviderService; } });
|
|
20
|
+
__exportStar(require("./dto/mfa.dto"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAOA,2EAAuE;AAA9D,qIAAA,uBAAuB,OAAA;AAChC,gDAA8B"}
|