Magento 2 Two Factor AuthenticationMagento 2 Two Factor Authentication
Live Demo
Buy Now
Support
Live Demo
Buy Now
Support
  • Getting Started

    • Introduction
    • Requirements
    • Installation
  • Third-Party Setup

    • Twilio Setup
    • Firebase Setup
  • Configuration

    • Admin Configuration
    • i18n Translation
  • Authentication Channels

    • SMS Authentication
    • Email OTP
    • Email Verification Link
    • Push Notification
    • TOTP Authenticator App
  • Security & Recovery

    • Backup Recovery Codes
    • Brute-Force & Lockout
    • Admin Management & Unlock
  • Help

    • Troubleshooting
    • FAQ & Support

Mobile SMS Authentication (Twilio)

SMS-based authentication delivers high-reliability one-time passcodes (OTP) directly to customer mobile phones via Twilio.


Configuration Summary

Under Stores > Configuration > Webkul > Two Factor Auth:

  • Send Otp Via: Mobile
  • Auth ID: Twilio Account SID
  • Token: Twilio Auth Token
  • Message: Your Auth Code is {auth_code}.
  • Sender Number: Twilio phone number

Twilio Settings


Workflow 1: New Customer Registration

  1. The customer visits the store registration page and fills in their personal details, email address, password, and mobile number.

Customer Registration Form

  1. Upon clicking Create an Account, an SMS OTP is dispatched to the provided phone number.
  2. A verification prompt appears on screen asking for the one-time code.

Verification Code Prompt

  1. The customer inputs the SMS OTP and clicks Confirm.
  2. Once validated, the customer account is created and the user is redirected to the dashboard.

Account Created Successfully


Workflow 2: Existing Customer Login

  1. The customer enters their registered email and password on the sign-in page and clicks Sign In.

Customer Login Page

  1. The 2FA modal opens immediately, prompting for the SMS code sent to their registered mobile phone.

Enter SMS OTP Popup

  1. The customer receives the SMS notification containing the auth code on their mobile device.

SMS Received on Phone

  1. The customer enters the code (supports direct typing or copy-pasting) and submits.
  2. The session is verified and the customer is logged in.

Customer Logged In

Next
Email OTP