JSPM

  • Created
  • Published
  • Downloads 266
  • Score
    100M100P100Q89163F
  • License SEE LICENSE

Email one-time code MFA provider for nauth-toolkit

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).

Documentation · GitHub

Part of nauth-toolkit. Requires @nauth-toolkit/core and an email provider.


Install

npm install @nauth-toolkit/mfa-email @nauth-toolkit/email-console

Enable 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 {}

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.