SMS Providers
SMS providers for sending verification codes and MFA challenges.
Available Providers
| Provider | Package | Description |
|---|---|---|
| AWS SNS | @nauth-toolkit/sms-aws-sns | Production SMS via AWS SNS or AWS End User Messaging SMS (configurable; supports configuration sets) |
| Console | @nauth-toolkit/sms-console | Development (logs to console) |
Provider Interface
All SMS providers implement SMSProvider:
interface SMSProvider {
sendOTP(
phone: string,
code: string,
templateType?: string,
variables?: Record<string, unknown>
): Promise<void>;
sendVerificationCode?(phone: string, code: string): Promise<void>;
setTemplateEngine?(engine: SMSTemplateEngine): void;
setGlobalVariables?(variables: SMSTemplateVariables): void;
}
Templates
Customize SMS message content with templates:
- SMS Templates Feature Guide - Complete guide to customizing SMS messages
- SMS Templates Configuration - API reference for template configuration