Two-factor authentication (2FA) – SMS

By October 17, 2019Uncategorized

Two-factor authentication
Image result for 2-factor authentication

Two-factor authentication also known as 2FA or 2-Step Verification is an authentication method that requires two components, such as a pin/password + a token.

This is a security process in which the user journey is taken to two different authentication factors to verify themselves as part of a security process. This is an extra layer of security that does not only require the user to enter his details but also to verify the person via a unique code sent via SMS.

 After you set it up, you’ll sign in to your account in two steps using:

  • Something you know (your password)

  • Something you have (like your phone )


Related image


When is Two-factor authentication ideal to product cumbersome identities :

  1. Remote Access to corporate networks

  2. E commerce sites

  3. APP downloads

  4. Financial Transaction

  5. Cloud services

  6. Password Recovery


How does SMS authentication work? (Two-factor authentication)

They send SMS, One Time Password (OTP) to users when users want to make any important transactions on their site or over telephone. When websites want to authenticate a user, they simply create a token or random code and send OTP Sms Gateway to the user’s mobile phone.

<?php$username = ‘username’; // Enter HTTP API Username$password = ‘password’; // Enter HTTP API Password$number_test = ‘3567878787’; // Enter mobile number with country code to send sms$otp = mt_rand(100000, 999999); // This will create random OTP and save this otp in database for above number to verify after submitting form.

For a complete JAVASCRIPT CODE on how to generate an OTP and send through OKROUTE SMS GATEWAY please click on the following link



More posts by OKROUTE NEWS