How to set up OTP Verification for WordPress Default Login Form?
OTP verification via Phone or Email on the WordPress default login form. Secure your WordPress website's login process using OTP verification or Two-factor authentication. Increase the security of your WordPress website and secure user accounts by adding an extra layer of verification.
miniOrange's OTP verification Plugin adds security to WordPress's default login forms by requiring users to provide a one-time passcode to validate their phone or email. This guide will help you set up OTP verification for the WordPress default login form.
You can download miniOrange OTP Verification plugin using the following link:
Follow these steps to setup OTP Verification on the WordPress default Login Form
1. Setup Phone Verification for WordPress default Login Form
Go to the Forms tab in the OTP Verification plugin.
Search and select WordPress default login Form from the list.
Enable the checkbox next to the WordPress default Login Form and enable Phone Verification.
Enter meta key in the Phone User Meta Key field.
If you don't know the metaKey against which the phone number is stored for all your users then put the default value as phone.
Then, click on the Save Settings button.
Go to the WordPress default login form and enter your login credentials.
Then click on the Login button.
You will receive a pop-up prompting you to confirm the OTP, which will be sent to the phone number linked to the user's account.
Input the OTP and then click the Validate OTP button.
Once the OTP verification is successful, the user will be logged into their account successfully.
1.1. Allow the user to add a phone number if it does not exist
When a user does not have a registered phone number associated with their account, check the enable “Allow the users to add a phone number if it does not exist” option.
Click on the Save Settings button.
Navigate to the WordPress default login form.
Enter your username and password then click the Login button.
If a user hasn't registered a phone number with their account, they will receive a pop-up prompting them to do so.
Users should input their phone number and then click on the Send OTP button.
The OTP will be sent to the registered phone number, and the user will be required to enter the received OTP for verification.
Click on the Validate button.
Once the OTP verification is successful, the user will be logged into their account successfully.
1.2. Allow users to log in using their phone numbers.
If a user is to login using their phone number, the enable "Allow users to login with their phone number" option.
You have the option to modify the text in the Username field.
Then click on the Save Settings button.
Navigate to the WordPress default login form.
Please enter your Username/Email/Phone Number along with your Password.
Next, click on the Login button.
You'll receive a popup to verify the OTP. enter the OTP received via phone/email, then click on the Validate OTP button.
Once the OTP verification is successful, the user will be logged into their account successfully.
1.3. Do not allow users to use the same phone number for multiple accounts
This setting ensures that each phone number can only be associated with a single user account, preventing multiple accounts from using the same phone number.
Enable the option "Do not allow users to use the same phone number for multiple accounts."
Then click on the Save Settings button.
Should a user attempt to use the same phone number for multiple accounts, they will receive an error message.
2. Setup Email Verification for WordPress default Login form
Go to the Forms tab in the OTP Verification plugin.
Search and select WordPress default login Form from the list.
Enable the checkbox next to the WordPress default Login Form and enable Email Verification.
Then click on the Save Settings button.
The user will be sent an OTP to the email address linked to their account.
A pop-up will appear for OTP verification. Enter the OTP and click the Validate OTP button.
Once the OTP verification is successful, the user will be logged into their account successfully.
3. Advance settings for Phone & Email verification
3.1. Allow users to login with a password and OTP (2FA)
Navigate to the Advance settings for phone and Email verification.
Enable the “Login with Password and OTP (2FA)” option.
Next, click on the Save Settings button.
Go to the WordPress default login form and enter your login credentials.
Then, click on the Login button.
You'll receive a popup to verify the OTP. enter the OTP received via phone/email, then click on the Validate OTP button.
Once the OTP verification is successful, the user will be logged into their account successfully.
3.2. Allow users to login with only OTP
This feature allows users to log in without using a password, known as Passwordless Login. To access their accounts, users will only need to input their Username/Phone Number/Email address, and an OTP will be sent to either their Phone Number or Email address, depending on the enabled OTP type.
Enable the "Login with only OTP" option, and afterward, click on the Save Settings button.
Go to the WordPress default login form.
Please enter your Username and then click on the Login with OTP button.
You'll receive a popup to verify the OTP. enter the OTP received via phone/email, then click on the Validate OTP button.
Once the OTP verification is successful, the user will be logged into their account successfully.
3.2.1 Allow users to login with Username and Password
With this option, users will have the choice to either log in using OTP alone or to use the method of logging in with a Username and password.
Enable the “Login with only OTP” setting.
Check the checkbox to enable “Allow users to login with Username and Password” setting.
Next, click on the Save Settings button.
Go to the WordPress default login form.
Enter your Username/Email and then click on the Login with Password button.
You'll now encounter a password field. Input your password and then click on the Login with Password button.
The user will be logged into the account successfully.
3.3. Allow the Administrator to bypass OTP verification during the login
Enable “Allow the administrator to bypass OTP verification during the login” option.
Next, 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.
Now if you login within the interval period you entered, you will not be asked for OTP verification.
4. Select Redirection after login
Navigate to the “Select Redirect after login” feature.
If users wish to be redirected to the default page after logging in, activate the "Redirect to Default Page (Current Page)" option.
Then click on the Save Settings button.
To redirect to a specific page after login, users can enable the "Select Redirection Page" option. They can then choose a page from the dropdown list.
Next, then click on the Save Settings button.
Once you log in, you'll be directed to the chosen page.