Skip to main content

Multi-Factor Authentication (MFA)

Endpoints

EndpointDescription
POST /auth/mfa/verify-loginComplete MFA during login without requiring JWT

Request Body:

{
"userId": "uuid",
"code": "123456",
"rememberDevice": true,
"deviceInfo": "optional device identifier"
}

DTOs

Registration & verification DTOs under apps/idp/src/app/dto/mfa.dto.ts:

  • Setup MFA
  • Verify MFA
  • Disable MFA
  • Backup codes

Providers

ProviderEnvironment Variables
SMSTWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_VERIFY_SERVICE_SID
WhatsAppWHATSAPP_TOKEN

Preferences

OTP notifications respect user contact preferences (scope OTP), failing open on lookup errors to avoid lockouts.