The One-Time Password or PIN (OTP), is a dynamic password generated for users to use in logging once to a computer system, network or other digital devices.
The OTP is an additional security layer to the traditional Username and Passwords. The OTP is usually a dynamic one time generated password sent via SMS, email address or a hardware token to avoid unauthorized access to a user account.
Hackers through phishing sometimes gain access to user passwords and usernames making it easy for them to access user accounts and cause damages to the users. With an OTP, even if an hacker has your login details handy, it will be extremely difficult to have access to the OTP sent to users registered phone or email account. This makes the One-time password an effective means of curbing fraud and eliminating unauthorized access to user accounts and resources.
The script sends a one-time password to the registered user trying to access the system. Once the OTP matches what was sent to the registered phone or email address, the user is authenticated and granted access to the system.
PHP 5.6 and Above
V.1 (2022)