Info


Two Factor Authentication

Login & Registration via Password & OTP.

Author : yupok

Create Date : 10-04-2020

Support : yupokteam@gmail.com

Overview


TwoFactor Authentication is a complete and responsive feature with Login & Registration for your online business. This will help your customers to easy Login or Registration with Password & OTP. OTP verification adds an extra layer security.

This feature has an attractive front end and back end interface that are really awesome and eyecatching. Almost all kinds of changes are possible to do using the admin panel without having any kind or programming language knowledge.

It is built using the procedural php (with PDO feature) and without any framework. For this reason, it can be customized easily by most of the developers and create own websites with this awesome feature.

Security : It is protected against SQL injection, XSS and other attack and your website will be safe.

SMS Gateway List


  • BhashSMS
  • IndiaSMS
  • MSG91
  • TextLocal
  • Clickatell
  • 2Factor.in
  • Custom API (without International Code)
  • Custom API (with International Code without "+" sign)
  • Custom API (with International Code & with "+" sign.)

TwoFactor Authentication is a complete package for even custom http api url.

Features


Admin
  • Choose variety range of SMS Gateway
  • Setup Custom SMS Gateway only just with URL.
  • Manage Country - Show Single or Multiple Country in User Registration.
  • Activate/Deactivate All Country with Single Click.
  • Live Search User
  • Activate/Deactivate User.
  • Update Admin Credentials.
User
  • Login with Password & OTP.
  • Registration with Password & OTP.
  • Recover Password via OTP.
  • Strong Password Validation.
  • Update Name & Address.
  • Update Mobile via OTP after Login.
  • Update New Password via OTP, No need to remember Old Password.

Requirements


Before starting to install, make sure you fulfill the following requirements:
  • For Local Server installation, you need to have XAMPP, WAMP or any apache server with PHP and MySQL
  • You can use this script on any live LINUX server.
  • Required PHP version in server >= 5.4.
  • PDO & Curl must be enabled in the server.

Configuration


Note:This is very important, Please follow all the instructions carefully otherwise Script will not work.
  • Step :1) Go to uploads folder in which zip file named twofactor and then extract it.
  • Click on the image to view
  • Step :2) After Extracting you will get twofactor Folder.
  • Click on the image to view
  • Step :3) Open twofactor Folder, You will see all the script files & folders.
  • Click on the image to view
  • Step :4) Open admin Folder, where you see db folder.
  • Click on the image to view
  • Step :5) Open db Folder, where you see config.php file.
  • Step :6) Open config.php file with any text editor like Notepad++, Dreamviewer, etc.
  • Click on the image to view
  • Step :7)config.php file contains very important configuration settings. You must have to edit those properly.
    • Hostname:This is your database hostname.
    • Database Name :This is your database name.
    • Database Username:This is your Username for the database you created.
    • Database Password:This is your Password for the database you created.
  • Click on the image to view

Admin Details


After you setup the script successfully on your web server, you can login to the admin panel using the information below:
  • Email:super@admin.com
  • Password:123456
  • You can change admin details anytime. After you login click on the bottom of setting icon.
  • Click on the image to view

Activate SMS Gateway Service.


After you login you land on this page. Select your SMS Gateway which you want to Activate and Save. You can change your SMS Gateway anytime.

Setting Up SMS Gateway Credentials


  • 1) Click on API Options
  • 2) Then Click on Your SMS Gateway Option which you have activate in last step above.

BhashSMS Gateway Credentials


  • BhashSMS Username : This is username for which you can login to BhashSMS website.
  • BhashSMS Password : This is Bhashsms password.
  • BhashSMS Sender ID
  • Priority : This should be ndnd for Transactional SMS.
  • stype : This should be normal because you are sending Text OTP SMS.
After filling all the details then click on Save Button.

IndiaSMS Gateway Credentials


  • IndiaSMS Username : This is username for which you can login to IndiaSMS website.
  • IndiaSMS Password : This is IndiaSMS password.
  • IndiaSMS Sender ID
  • type : This should be TEXT because you are sending Text OTP SMS.
After filling all the details then click on Save Button.

MSG91 Gateway Credentials


  • MSG91 Authentication Key : First login to MSG91 website and in API->Auth Key .
  • MSG91 Sender ID : Sender ID Configuration -> Add Sender ID/ Your Approved Sender ID.
  • MSG91 route :route=1 for promotional, route=4 for transactional SMS , For OTP it should be 4
  • Msg91 Country : 0 for international, 1 for USA, 91 for India , your country code.
  • Msg91 Template ID (Optional) : This is Optional you can leave it blank or In send OTP you can create your Template.
After filling all the details then click on Save Button.

TextLocal Gateway Credentials


  • Textlocal API Key : Login to TextLocal & in Settings you will get your API Keys.
  • Textlocal Sender ID : If you do not have SenderID then fill TXTLCL otherwise use your own approved SenderID
After filling all the details then click on Save Button.

Clickatell Gateway Credentials


  • Clickatell API Key : Login to Clickatell & in LeftSideBar you will get your My APIs.
  • Clickatell Username : In LeftSideBar Settings->Account Details , you will get your Clickatell Username.
  • Clickatell Password : This is your Clickatell Login Password.
After filling all the details then click on Save Button.

2Factor.in Gateway Credentials


  • 2Factor.in API Key : Login to 2Factor.in & in SMS OTP -> Settings you will get your API key.
  • 2Factor.in SenderID : This is Optional, You can leave blank. Otherwise in SMS OTP -> OTP Templates you can create Template Name & Sender ID.
  • 2Factor.in Template Name : This is Optional, You can leave blank. Otherwise in SMS OTP -> OTP Templates you can create Template Name & Sender ID.
After filling all the details then click on Save Button.

Custom API (without International Code)


This Custom API means your SMS service provider provides service only in 1 Country & without International Phone Format
  • Custom Http API URL* (Must Be Curl Supported) : Just Fill the full Http API URL with your credentials which your SMS Gateway Provider provides you.
  • Example : http://bhashsms.com/api/sendmsg.php?user=XXXXXXXX&pass=XXXXXXXXX&sender=XXXXXXXX&phone=user_phone_abcd&text=user_message_abcd&priority=ndnd&stype=normal
  • Note : Do not change value of phone/mobile/to = user_phone_abcd and content/text/message = user_message_abcd
After filling all the details then click on Save Button.

Custom API (with International Code & without "+" sign.)


This Custom API means your SMS service provider supports International SMS but without "+" sign.
  • Custom Http API URL* (Must Be Curl Supported) : Just Fill the full Http API URL with your credentials which your SMS Gateway Provider provides you.
  • Example : http://api.clickatell.com/http/sendmsg?api_id=EHEE1Ld9IUQB1Q&user=XXXXXXXX&password=XXXXXXXX&to=user_phone_abcd&text=user_message_abcd
  • Note : Do not change value of phone/mobile/to = user_phone_abcd and content/text/message = user_message_abcd
After filling all the details then click on Save Button.

Custom API (with International Code & with "+" sign.)


This Custom API means your SMS service provider supports International SMS & also support "+" sign before country code just like Clickatell.
  • Custom Http API URL* (Must Be Curl Supported) : Just Fill the full Http API URL with your credentials which your SMS Gateway Provider provides you.
  • Example : http://api.clickatell.com/http/sendmsg?api_id=EHEE1Ld9IUQB1Q&user=XXXXXXXX&password=XXXXXXXX&to=user_phone_abcd&text=user_message_abcd
  • Note : Do not change value of phone/mobile/to = user_phone_abcd and content/text/message = user_message_abcd
After filling all the details then click on Save Button.

SmartSMS.sk Gateway Credentials


  • SmartSMS.sk Username : This is username for which you can login to SmartSMS.sk website.
  • SmartSMS.sk Password : This is SmartSMS.sk password.
  • SmartSMS.sk Sender ID
After filling all the details then click on Save Button.

SmartSMS.sk Gateway Credentials


  • Infobip Username : This is username for which you can login to Infobip website.
  • Infobip Password : This is Infobip password.
  • Infobip Sender ID
After filling all the details then click on Save Button.

Country Activate / Deactivate


  • Activate All Country with One Click, Activate All. In Registration Form all country will show.
  • Deactivate All Country with One Click, Deactivate All, But you have activate at least 1 Country to Register User
  • Search Country Name which you want to Activate/Deactivate.
  • Click on Active/Deactivate
  • A pop up shows which ask you Do you want to change Country Status click yes and you are done.

Activate / Deactivate User


  • Search User Name/Mobile/Anything which you want to Activate/Deactivate.
  • Click on Active/Deactivate.
  • A pop up shows which ask you Do you want to change User Status click yes and you are done.
  • If customer is active they can login or if customer is not active they cannot login.
  • Anytime you can change status of Customer i.e. Active or Deactive.

Update Admin Details


Clicking on Setting Icon on the Bottom a page appears where Admin can change their Name, Email & Password
  • Note: Old Password is mandatory to Update anything.

User Registration


In Registration Form Only those Country will show which you have activate in Admin Panel
  • Fill all the details and click on Register.
  • User redirect on that page where user Mobile will show and must have to verify OTP.
  • After verification of OTP user successfully registered and redirect on Dashboard.
  • Note: Validating Mobile before Registration whether its Regsitered or not or deactive by admin.

User Login


Login via Password & OTP.
  • Enter Mobile Number & Password & OTP will delivered to your Mobile.
  • After User verifies OTP successfully they redirect on to the Dashboard.

Update User Details


User can update their details by Clicking on Manage Details Option.
  • After fill all the details just click on Save button.

Update User Country


User can update their Country by Clicking on Manage Country Option.
  • After choosing country just click on Save button.

Update User Mobile


User can update their Mobile by Clicking on Manage Phone Option.
  • If Mobile is already registered it shows an Error.
  • If Mobile is not registered OTP will deliver to Mobile & Verify that. After verification Users mobile will be updated.

Update User Password


Sometimes user saves the password in browser, so we used verification of OTP that adds an extra layer security to users. No need to remember Old Password.
  • Registered mobile shows on Update Password Page press Continue.
  • An OTP delivered to Mobile, after successfully verification a page will appear for change the password.

Forgot Password


Forgot password option is Upperhand for your website.
  • Just Click on Forgot Password Link on Login Page.
  • Enter Registred Mobile.
  • Verify OTP.
  • Enter New Password and Done.

Copyright © yupok


You are not allowed to use this documentation template for your personal or commercial or any other purposes.