Auth0 SMS Integration

Official Auth0 Marketplace Partner — MFA & Passwordless SMS

Add SMS-based multi-factor authentication and passwordless login to your Auth0 applications. Available as an official integration on the Auth0 Marketplace — install in one click and start sending verification codes through DataFlows' Australian SMS network.

What is Auth0 SMS Action?

DataFlows SMS is an official integration on the Auth0 Marketplace, enabling SMS-based authentication for your Auth0 applications. It intercepts phone message requests in the Send Phone Message flow and delivers verification codes through DataFlows' SMS API.

Whether you need multi-factor authentication (MFA) to add a second layer of security, or passwordless login for a frictionless user experience, this integration provides a cost-effective alternative to Auth0's default Twilio provider — with Australian-based support and competitive pricing.

Auth0 MarketplaceOfficial PartnerAuth0 ActionsMFA Ready
👤
User Login
🔐
Auth0 MFA
Action
📱
SMS Sent

Features & Capabilities

Everything you need for SMS-based authentication in Auth0

🔐

Multi-Factor Authentication

Add SMS-based MFA to your Auth0 authentication flow. Send one-time passwords via SMS as a second factor, providing an additional layer of security for user accounts and sensitive operations.

📱

Passwordless SMS Login

Enable passwordless authentication where users sign in using only their phone number. Users receive a one-time code via SMS, eliminating password fatigue and improving the user experience.

Auth0 Actions Integration

Deploy as a custom Auth0 Action in the 'Send Phone Message' flow. Seamlessly intercepts SMS requests and routes them through DataFlows API with zero changes to your existing authentication logic.

💰

Cost-Effective SMS Delivery

Replace expensive default SMS providers with DataFlows' competitive pricing. Send Australian SMS from just 3.5¢ per message—significantly cheaper than Twilio and other enterprise providers.

🌏

Australian Infrastructure

Optimized for Australian businesses with local SMS routing, faster delivery times, and competitive rates for domestic messages. Also supports international SMS to 200+ countries.

📝

Custom Message Templates

Personalize your MFA and passwordless messages with custom templates. Use the {{code}} placeholder to insert verification codes into branded messages that match your application's voice.

Use Cases for Auth0 SMS

Common scenarios where SMS authentication enhances security

🏢

Enterprise Applications

Secure corporate applications with SMS-based MFA. Protect employee accounts, admin dashboards, and sensitive business systems with an additional authentication factor.

enterprise MFAcorporate securityadmin protection
🛒

E-Commerce Platforms

Reduce account takeover fraud in online stores. Verify high-value transactions, protect customer accounts, and build trust with SMS-based security measures.

ecommerce securityfraud preventiontransaction verification
🏥

Healthcare & Finance

Meet compliance requirements for sensitive industries. SMS MFA helps satisfy regulatory standards for protecting patient data, financial information, and personal records.

HIPAA compliancefinancial securityregulated industries
📲

Mobile-First Applications

Provide frictionless authentication for mobile users. Passwordless SMS login eliminates typing passwords on small screens, improving conversion rates and user satisfaction.

mobile authenticationpasswordless loginuser experience

Step-by-Step Setup Guide

Deploy the Auth0 SMS Action in 6 simple steps

1

Get DataFlows Credentials

Sign up for a DataFlows account and retrieve your API Token and Sender ID from the Developer Settings page.

2

Install from Auth0 Marketplace

Go to the Auth0 Marketplace listing for DataFlows SMS and click 'Add Integration'. Auth0 will automatically create the Action in your tenant's Send Phone Message flow.

3

Configure the Action

Open the installed Action in your Auth0 Dashboard. The code is pre-loaded — you only need to add your DataFlows credentials as secrets.

// dataflows-sms-action.js
exports.onExecuteSendPhoneMessage = async (event, api) => {
  const response = await fetch('https://api.dataflows.com.au/sms/send', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${event.secrets.DATAFLOWS_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      recipient: event.message_options.recipient,
      sender_id: event.secrets.DATAFLOWS_SENDER_ID,
      message: event.secrets.MESSAGE_TEMPLATE?.replace('{{code}}', event.message_options.text)
               || `Your verification code is: ${event.message_options.text}`
    })
  });

  if (!response.ok) {
    throw new Error('SMS delivery failed');
  }
};
4

Add Secrets

In the Action editor, add your DataFlows credentials as secrets for secure storage.

DATAFLOWS_API_KEY=your_api_key_here
DATAFLOWS_SENDER_ID=your_sender_id
MESSAGE_TEMPLATE=Your {{app_name}} code is: {{code}}
5

Deploy & Activate

Click 'Deploy' to publish the action, then drag it into the Send Phone Message flow to activate it.

6

Enable Phone MFA

Go to Security → Multi-factor Auth → Phone Message. Enable it and select 'Custom' as the delivery provider.

Code Examples

Implementation patterns for Auth0 SMS authentication

Auth0 Action Code

The complete Action code for sending SMS via DataFlows

// Auth0 Action: DataFlows SMS Provider
exports.onExecuteSendPhoneMessage = async (event, api) => {
  const { recipient, text } = event.message_options;

  // Build message with custom template or default
  const template = event.secrets.MESSAGE_TEMPLATE || 'Your code is: {{code}}';
  const message = template.replace('{{code}}', text);

  // Send via DataFlows API
  const response = await fetch('https://api.dataflows.com.au/sms/send', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${event.secrets.DATAFLOWS_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      recipient: recipient,
      sender_id: event.secrets.DATAFLOWS_SENDER_ID,
      message: message
    })
  });

  if (!response.ok) {
    const error = await response.text();
    throw new Error(`SMS failed: ${error}`);
  }

  console.log('SMS sent successfully to', recipient);
};

Enforce MFA via Actions

Require MFA for specific users or conditions

// Enable MFA in your Auth0 Universal Login
// In your Auth0 Dashboard:
// 1. Go to Security → Multi-factor Auth
// 2. Enable Phone Message
// 3. Configure as required/optional

// Or enforce via Auth0 Rules/Actions:
exports.onExecutePostLogin = async (event, api) => {
  // Require MFA for admin users
  if (event.user.roles?.includes('admin')) {
    api.multifactor.enable('any', { allowRememberBrowser: true });
  }
};

Passwordless SMS Login

Client-side implementation for passwordless authentication

// Configure Passwordless SMS in Auth0
// Dashboard → Authentication → Passwordless

// Client-side implementation (Auth0 SDK):
import { Auth0Client } from '@auth0/auth0-spa-js';

const auth0 = new Auth0Client({
  domain: 'your-tenant.au.auth0.com',
  clientId: 'your_client_id'
});

// Start passwordless flow
await auth0.passwordlessStart({
  connection: 'sms',
  send: 'code',
  phoneNumber: '+61412345678'
});

// Verify the code
await auth0.passwordlessLogin({
  connection: 'sms',
  phoneNumber: '+61412345678',
  verificationCode: '123456'
});

DataFlows vs Default Auth0 SMS

Why developers choose DataFlows for Auth0 SMS

FeatureDataFlowsTwilio (Default)Savings
Australian SMS3.5¢7.5¢+53%
Monthly FeeNone$0-15+100%
Setup ComplexitySimpleDefault-
Custom TemplatesYesLimited-
Local SupportAustraliaGlobal-

Why Use This Integration?

  • Official Auth0 Marketplace integration — vetted and listed by Auth0 directly
  • One-click install — no manual code setup, Auth0 handles the deployment
  • Australian data routing — faster SMS delivery for local users
  • Transparent pricing — no hidden fees, monthly minimums, or long-term contracts
  • Enterprise-ready — scales from startups to high-volume enterprise applications

Technical Specifications

RuntimeNode.js 18 (Auth0 Actions)
Auth FlowSend Phone Message
Auth MethodsMFA, Passwordless
API FormatREST / JSON
DistributionAuth0 Marketplace
SupportOfficially Supported

Simple, Transparent Pricing

The Action is free. You only pay for SMS sent.

Free
Auth0 Action
Open-source code
Free
Inbound SMS
Replies are free

Frequently Asked Questions

How does the Auth0 SMS Action work?

When a user triggers SMS-based authentication (MFA or passwordless login), Auth0 calls your custom Action in the 'Send Phone Message' flow. The Action receives the phone number and verification code, then sends the SMS through DataFlows API instead of Auth0's default provider.

Is this a replacement for Twilio in Auth0?

Yes! Auth0's default SMS provider is Twilio, which can be expensive especially for Australian traffic. This integration lets you use DataFlows instead, with significantly lower per-message costs and optimized Australian delivery.

Can I use custom Sender IDs?

Absolutely. Configure your DATAFLOWS_SENDER_ID secret with your registered business name or virtual number. Your SMS messages will display your brand instead of a random number, improving trust and recognition.

What Auth0 plans support custom SMS providers?

Auth0 Actions for Send Phone Message are available on all paid Auth0 plans. The free tier has limitations on custom Actions, so check your plan's features in the Auth0 dashboard.

How do I customize the verification message?

Set the MESSAGE_TEMPLATE secret with your custom text, using {{code}} as a placeholder for the verification code. For example: 'Your MyApp security code is: {{code}}. Valid for 10 minutes.'

What happens if SMS delivery fails?

The Action throws an error, which Auth0 handles according to your flow configuration. Users typically see a retry option. DataFlows provides delivery status in your dashboard for troubleshooting.

Is this secure?

Yes. Your API credentials are stored as Auth0 Secrets, which are encrypted and never exposed to client-side code. The Action runs server-side in Auth0's secure infrastructure.

Can I use this for both MFA and passwordless?

Yes! The same Action handles both use cases. Auth0 uses the Send Phone Message flow for all SMS-based authentication, whether it's a second factor (MFA) or the primary authentication method (passwordless).

Related Topics

Supabase SMS IntegrationZapier SMS AutomationAuth0 AuthenticationMulti-Factor AuthenticationPasswordless LoginSMS API AustraliaIdentity ManagementTwilio AlternativeSMS VerificationPhone Authentication

Ready to Add SMS Authentication to Auth0?

Install the official DataFlows integration directly from the Auth0 Marketplace and start sending secure verification codes in minutes.