Magento 2How To GuideMay 17, 2024Simon Walker

How to Configure Mobile OTP Login in Magento 2?

How to Configure Mobile OTP Login in Magento 2?

In today’s digital landscape, one of the most pressing concerns for any business, including online stores, is ensuring their user’s safety. A simple mistake or lax security controls can result in a data breach. This can undermine your store’s reputation, compromise users’ confidential information, and lead to legal repercussions.

Therefore, ensuring your store’s security must be a top concern.When talking about enhancing your store’s security, there are a wide range of options. The simplest and one of the most effective is to set up two-factor authentication or 2FA. A recent survey of leading developers supports this point.

password-security-statistic

Source: Statista

As you can see from the above statistic, the topmost priority for developers from a security perspective is to increase two-factor authentication adoption. Password security is the second most important priority. Remember, just by setting up 2FA and having a strong password, you can ensure 99 per cent security.

In 2FA, you need two separate forms of identification.First, you will need to enter your password to login to Magento as an admin or a user. After entering the password, a unique code will be sent to your mobile device or email. This is the 2nd form of identification. You will need to enter this code to complete the login process.

As you can see for yourself, 2FA is undoubtedly more secure than simple password protection. If your store is based on Magento 2, we have some bad news. Unfortunately, Magento 2 does not have a pre-built 2FA function.In other words, if you wish to set up Magento 2 OPT login, you will need an extension.

The good news is that you don’t need to hire a Magento development company for this purpose. The reason is that we already have a Magento 2 Mobile OTP Login extension. In this article, we will guide you on how to configure mobile OTP login using our extension.

Using FMEExtensions Magento 2 Mobile OTP Login

Before we discuss the steps to set up mobile OTP login in Magento 2, let’s get a brief overview of this extension’s most notable features.

  • Enable OTP Login with Mobile Number/Email

It means you can set OTP on the user’s mobile number and email.

  • Enable OTP on User Registration Form

To curb fake registration, you can implement 2FA during the registration process. We have a separate ‘Restrict Fake Registrations’ extension as well.

  • Enable OTP on Checkout Page

To curb fraudulent transactions, you can set up an OTP on the checkout page. Unless the user enters the OTP, the transaction will not complete.

  • Allow OTP in Specific Countries

You can set up OTP requirement in specific countries. This is a great feature for stores serving multiple countries.

Setting Up Mobile OTP Login

Step 1: Go to FME EXTENSIONS >Configuration. You will get the following options.

mobile-otp-login-configuration

As you can see from the above image, we have already preconfigured the extension in this case. We have enabled OTP for customer registration, login, checkout, and mobile number update.

Step 2: Set Up Firebase SMS to enable SMS OTP. Before setting up Firebase, you need to have a Firebase SMS API Key. For this, you’ll need to register here. In case you run into trouble, check out this tutorial or reach out to our team. Once you complete the registration process, enter the required information.

firebase-information

Please note that the above information will vary from user to user. Therefore, only enter your Firebase information.

Note: If you wish to configure email OTP too, refer to the user guide. You will need our SMTP Extension to set up email OTP.

Step 3: After configuring SMS and/or email OTP, go to the ‘Other Features’ tab.

otp-expiry-time

You can set up OTP expiry time. As you can see from the above image, the default duration is 60 seconds. You can change this depending on your requirements.

otp-button-and-text-color

Another key function is that you can change the OTP button and text colour. Our Magento 2 experts recommend matching the colours with your store theme.

Step 4: Refresh the Cache.

After you complete all the previous steps, you must refresh the cache for the changes to take effect.

flush-magento-cache

Steps to clear cacheare System > Cache Management > Select All from Mass Actions > Click Refresh the Cache.

Final Thoughts on Magento 2 Mobile OTP Login

This concludes our article on how to configure mobile OTP login in Magento 2. If you still have questions, you can book a live demo. Our experts will guide you in detail about the extension’s working and answer your queries.

Other Related Extensions: