How to Configure WooCommerce Login Form with OTP Verification Plugin?
OTP Verification using Phone or Email on WooCommerce login form. Secure the Login process on your websites using WooCommerce login with OTP verification or Two-factor authentication. Enhance your website's security and protect user accounts with an extra layer of authentication.
miniOrange’s OTP verification Plugin adds a layer of security to the login forms by verifying the user's Phone or Email by submitting a one-time passcode. This guide aims to assist you in setting up OTP Verification for the WordPress WooCommerce login form.
You can download miniOrange OTP Verification plugin using the following link:
Follow these steps to setup OTP Verification on the WooCommerce Login Form
1. Setup Phone Verification for WooCommerce Login Form
Go to the Forms tab in the OTP Verification plugin then search and select WooCommerce Login Form from the list.
Enable the checkbox next to the WooCommerce Login Form and enable Phone Verification.
If you are using a WooCommerce registration form then use billing_phone as the Phone user meta key. If you are using another registration form then the meta key will also change.
Then, click on the Save Settings button.
Go to the WooCommerce login form and enter your login credentials.
Then click on the Login button.
You will get a popup to validate the OTP. OTP will be sent to the phone number associated with that user.
Enter the OTP then click on Validate OTP button.
The user will be successfully logged into the account once successful OTP verification.
1.1. Allow the user to add a phone number if it does not exist
When the user does not have a registered phone number associated with their account, the user can enable the "Allow users to add phone number if it does not exist" checkbox.
Then click on the Save Settings button.
Go to the WooCommerce login form.
Enter your login credentials and click on the Login button.
If user don't have a phone number registered with their account then they will get a pop-up to register the phone number.
In that, user enter their phone number and click on the Send OTP button.
OTP will be sent to the registered phone number. The user will need to enter the OTP received on the phone number.
Then click on the Validate button.
The user will be successfully logged into the account once OTP verification.
1.2. Allow users to login with their phone number
When a user wants to login with their phone number, Check the enable “Allow users to login with their phone number” option.
You can edit the Username field text.
Then click on the Save Settings button.
Go to the WooCommerce login form.
Enter your Username/Email/Phone Number and Password.
Then click on the Login button.
You will get a popup to validate the OTP. Enter the OTP received in your phone/Email then click on the Validate OTP button.
The user will be successfully logged into the account once successful OTP verification.
1.3. Do not allow users to use the same phone number for multiple accounts
In this feature, Users can’t use the same phone number for multiple accounts. Check the enable “Do not allow users to use the same phone number for multiple accounts” option.
Then click on the Save Settings button.
If the user uses the same phone number for multiple accounts, the user will get an error message.
2. Setup Email Verification for WooCommerce Login form
Go to the Forms tab in the OTP Verification plugin then search and select WooCommerce Login Form from the list.
Enable the checkbox next to the WooCommerce Login Form and enable Email Verification.
Then click on the Save Settings button.
The user will receive an OTP on the email address associated with their account.
A pop-up will appear to verify the OTP.
Enter OTP in them and click on Validate OTP button.
The user will be successfully logged into the account once successful OTP verification.
3. Advance settings for Phone & Email verification
3.1. Allow users to login with a password and OTP (2FA)
Go to the Advance settings for phone and Email verification.
Enable the “Login with Password and OTP (2FA)” option.
Then click on the Save Settings button.
Now go to the WooCommerce login page.
Enter your login credentials and click on the Login button.
You will get a popup to validate the OTP. Enter the OTP received in your phone/Email then click on the Validate OTP button.
The user will be successfully logged into the account once successful OTP verification.
3.2. Allow users to login with only OTP
In this feature, users will be able to log in without a password (Passwordless Login).
User will need to enter the Username/Phone Number/ Email address of their account and OTP will be sent to their Phone Number or Email address based on the OTP type enabled.
Enable the “Login with only OTP” option.
Then click on the Save Settings button.
Go to the WooCommerce login form.
Enter your Username and click on the Login button.
You will get a popup to validate the OTP. Enter the OTP received in your phone/Email then click on the Validate OTP button.
The user will be successfully logged into the account once successful OTP verification.
3.2.1 Allow users to login with Username and Password
With this option, users can choose to log in either using an OTP alone or with a username and password.
Enable the “Login with only OTP” setting.
Check the enable “Allow users to login with Username and Password” option.
Then click on the Save Settings button.
Go to the WooCommerce login form.
If you have to login with a Password, enter your Username and click on the Login with Password button.
Now you will see a field for the password. Enter your password in it and click on the Login with Password button.
The user will be successfully logged into the account.
3.3. Allow the Administrator to bypass OTP verification during the login
In this feature, the administrator will not be asked for OTP verification while logging in.
After that, check the enable “Allow the administrator to bypass OTP verification during the login” option.
Then click on the Save Settings button.
3.4. Delay OTP Verification
With this feature, the OTP verification will not be prompted until the interval entered by the user while logging in.
Enable the “Delay OTP Verification” setting.
Enter the interval at which you want OTP Verification to be invoked for users.
Next, then click on the Save Settings button.
4. Select Redirection after login
Go to the “Select Redirect after login” feature.
If the user wants to redirect to the default page after login, enable the “Redirect to Default page (Current Page)” option.
Then click on the Save Settings button.
If the user wants to redirect to the selected page after login, enable the “Select Redirection page” option.
Then select a page from the list of the dropdown.
Then click on the Save Settings button.
After you login you will be redirected to the selected page.