Magento 2 OTP Login
Last updated
Was this helpful?
Last updated
Was this helpful?
Table of Contents
Installation via app/code
Installation via Composer
Installation via app/code: Upload the content of the module to your root folder. This will not overwrite the existing Magento folder or files, only the new contents will be added. After the successful upload of the package, run below commands on Magento 2 root directory.
Installation via Composer: Please follow the guide provided in the below link to complete the installation via composer.
Go to Admin > Stores > Configuration > Scommerce Configuration > OTP Login
Enabled - Select “Yes” or “No” to enable or disable the module.
License Key - Please add the license for the extension which is provided in the order confirmation email. Please note license keys are site URL specific. Please go to Admin > Stores > Configuration > Scommerce Configuration > Core and click on "Verify" to verify the license key.
Enable Login with Mobile - Select "Yes" or "No". If set to "Yes" then users will be able to login to the store using their mobile number.
Allowed Countries- Select the countries allowed to be used for sending via SMS.
OTP Type - You can select the OTP type that sent via sms from Number, Alphabets, and Alphanumeric.
OTP Length - Enter the length of the OTP sent.
Expire Time- Add the time after which the OTP is expired and can't be used after this duration.
Time Between Resend (sec)- Enter the time in seconds after which users will be able to resend the otp.
Retry Count- Enter the number of retries allowed to resend otp before the user is locked out.
Lock Time (minutes)- Add the lock time on multiple otp failures
Channel on Register- Select the countries allowed to be used for sending via SMS.
Sender ID- Add the sender ID from Twilio.
Authorization Key - Add the authorization key from Twilio
Mobile Number- Add the mobile number from Twilio without the "+" sign
This section is to configure the Sender Email and the Email template used to send OTPs via Email:-
Success Email Sender- Select the Email to be used for sending successful login emails.
Otp Email Template - Select the Email template to be used for OTP emails.
This section is to configure the Sender Email and the Email template used to send OTPs via Email:-
Register Channel Message- Enter the message to be displayed on the registeration page for the users.
Go to the frontend and click on Sign In, you will it opens a popup to signin with Mobile. Add your Mobile number and click on Send OTP. Make sure Sign in with Mobile is enabled in the configuration only then you will be able to sign in using Mobile Number.
Enter the OTP to sign in
If the OTP is expired click on resend to resend the otp.
Go to the frontend and click on Sign In, you will it opens a popup, select Signin with Email.
Add credentials and proceed an OTP will be sent to your email, add to login to the store.
Go to the store and click on "Create an account", the registration will popup, add your details alongwith your phone number.
Finally click on Create Account and an OTP will be sent to your mobile number use it to register on the store.
Users can update their Phone Number with the Account by signing in to the store and then going to the "My Account" section. From the left menu click on "OTP Settings". Add your new number and password to update the mobile number.
This section is to configure TWILIO as the SMS provider used for sending OTPs. Please visit to create an account and extract the information to be added below:-
If you have a question related to this extension please check out our first. If you can't find the answer you are looking for then please contact .