@nauth-toolkit/mfa-email 0.1.25 → 0.1.27
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.
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { OnModuleInit } from '@nestjs/common';
|
|
2
|
-
import { EmailMFAProviderService } from '../src/email-mfa-provider.service';
|
|
3
|
-
import { MFAService } from '@nauth-toolkit/core';
|
|
4
1
|
/**
|
|
5
2
|
* Email MFA Module (NestJS Adapter)
|
|
6
3
|
*
|
|
@@ -21,13 +18,6 @@ import { MFAService } from '@nauth-toolkit/core';
|
|
|
21
18
|
* export class AppModule {}
|
|
22
19
|
* ```
|
|
23
20
|
*/
|
|
24
|
-
export declare class EmailMFAModule
|
|
25
|
-
private readonly emailMFAProvider;
|
|
26
|
-
private readonly mfaService;
|
|
27
|
-
constructor(emailMFAProvider: EmailMFAProviderService, mfaService: MFAService);
|
|
28
|
-
/**
|
|
29
|
-
* Auto-register Email provider with MFAService
|
|
30
|
-
*/
|
|
31
|
-
onModuleInit(): void;
|
|
21
|
+
export declare class EmailMFAModule {
|
|
32
22
|
}
|
|
33
23
|
//# sourceMappingURL=email-mfa.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-mfa.module.d.ts","sourceRoot":"","sources":["../../nestjs/email-mfa.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"email-mfa.module.d.ts","sourceRoot":"","sources":["../../nestjs/email-mfa.module.ts"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAiDa,cAAc;CAAG"}
|
|
@@ -5,9 +5,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
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
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
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
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
9
|
exports.EmailMFAModule = void 0;
|
|
13
10
|
const common_1 = require("@nestjs/common");
|
|
@@ -37,21 +34,6 @@ const internal_1 = require("@nauth-toolkit/core/internal");
|
|
|
37
34
|
* ```
|
|
38
35
|
*/
|
|
39
36
|
let EmailMFAModule = class EmailMFAModule {
|
|
40
|
-
emailMFAProvider;
|
|
41
|
-
mfaService;
|
|
42
|
-
constructor(emailMFAProvider, mfaService) {
|
|
43
|
-
this.emailMFAProvider = emailMFAProvider;
|
|
44
|
-
this.mfaService = mfaService;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Auto-register Email provider with MFAService
|
|
48
|
-
*/
|
|
49
|
-
onModuleInit() {
|
|
50
|
-
if (!this.mfaService) {
|
|
51
|
-
throw new Error('MFAService is not available. Ensure AuthModule.forRoot() is imported before EmailMFAModule.');
|
|
52
|
-
}
|
|
53
|
-
this.mfaService.registerProvider(this.emailMFAProvider);
|
|
54
|
-
}
|
|
55
37
|
};
|
|
56
38
|
exports.EmailMFAModule = EmailMFAModule;
|
|
57
39
|
exports.EmailMFAModule = EmailMFAModule = __decorate([
|
|
@@ -60,9 +42,7 @@ exports.EmailMFAModule = EmailMFAModule = __decorate([
|
|
|
60
42
|
// Email MFA Provider Service (factory provider)
|
|
61
43
|
{
|
|
62
44
|
provide: email_mfa_provider_service_1.EmailMFAProviderService,
|
|
63
|
-
useFactory: (mfaDeviceRepository, userRepository, config, logger, passwordService, emailVerificationService, challengeService,
|
|
64
|
-
auditService, // AuthAuditService from core
|
|
65
|
-
clientInfoService) => {
|
|
45
|
+
useFactory: (mfaDeviceRepository, userRepository, config, logger, passwordService, emailVerificationService, challengeService, auditService, clientInfoService) => {
|
|
66
46
|
return new email_mfa_provider_service_1.EmailMFAProviderService(mfaDeviceRepository, userRepository, config, logger, passwordService, emailVerificationService, challengeService, auditService, clientInfoService);
|
|
67
47
|
},
|
|
68
48
|
inject: [
|
|
@@ -77,10 +57,13 @@ exports.EmailMFAModule = EmailMFAModule = __decorate([
|
|
|
77
57
|
{ token: core_1.ClientInfoService, optional: true },
|
|
78
58
|
],
|
|
79
59
|
},
|
|
60
|
+
// Bind to shared discovery token (registration is performed by AuthModule at app bootstrap)
|
|
61
|
+
{
|
|
62
|
+
provide: internal_1.NAUTH_MFA_PROVIDER_TOKEN,
|
|
63
|
+
useExisting: email_mfa_provider_service_1.EmailMFAProviderService,
|
|
64
|
+
},
|
|
80
65
|
],
|
|
81
66
|
exports: [email_mfa_provider_service_1.EmailMFAProviderService],
|
|
82
|
-
})
|
|
83
|
-
__metadata("design:paramtypes", [email_mfa_provider_service_1.EmailMFAProviderService,
|
|
84
|
-
core_1.MFAService])
|
|
67
|
+
})
|
|
85
68
|
], EmailMFAModule);
|
|
86
69
|
//# sourceMappingURL=email-mfa.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-mfa.module.js","sourceRoot":"","sources":["../../nestjs/email-mfa.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"email-mfa.module.js","sourceRoot":"","sources":["../../nestjs/email-mfa.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,kFAA4E;AAE5E,qBAAqB;AACrB,8CAO6B;AAC7B,sDAAsD;AACtD,2DAKsC;AAEtC;;;;;;;;;;;;;;;;;;;GAmBG;AAkDI,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IAjD1B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE;YACT,gDAAgD;YAChD;gBACE,OAAO,EAAE,oDAAuB;gBAChC,UAAU,EAAE,CACV,mBAA8C,EAC9C,cAAoC,EACpC,MAAm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