Package Exports
- @nauth-toolkit/mfa-email
- @nauth-toolkit/mfa-email/nestjs
- @nauth-toolkit/mfa-email/openapi
Readme
@nauth-toolkit/mfa-email
Email one-time code MFA provider for nauth-toolkit.
Sends verification codes via email for multi-factor authentication. Requires an email provider (@nauth-toolkit/email-nodemailer or @nauth-toolkit/email-console for development).
Part of nauth-toolkit. Requires
@nauth-toolkit/coreand an email provider.
Install
npm install @nauth-toolkit/mfa-email @nauth-toolkit/email-consoleEnable in your auth config:
import { MFAMethod } from '@nauth-toolkit/core';
const authConfig = {
mfa: {
enabled: true,
allowedMethods: [MFAMethod.EMAIL],
},
};NestJS — import the module and it auto-registers:
import { EmailMFAModule } from '@nauth-toolkit/mfa-email/nestjs';
@Module({
imports: [NAuthModule.forRoot(authConfig), EmailMFAModule],
})
export class AuthModule {}Related packages
| Package | Purpose |
|---|---|
@nauth-toolkit/email-nodemailer |
Nodemailer — production email delivery |
@nauth-toolkit/email-console |
Console logging — development use |
@nauth-toolkit/mfa-totp |
TOTP authenticator apps |
@nauth-toolkit/mfa-sms |
SMS verification codes |
See the full package list in the core README.
Free to use. See license.