De-Californiacation Toolbox
Multi-factor authorization
MFA or Multi-factor authorization is a way which enhances an organization's security by asking their users to identify themselves not only by using a username and password but also by other means like entering a token that is sent to their mobile phone, or by entering a code that gets generated in authenticator apps like Google Authenticator and FreeOTP
(1 entry, 1 subcategory)
Multimedia
(4 entries, 3 subcategories)
Objectstore
(0 entries, 0 subcategories)
Office Suites
(2 entries, 0 subcategories)
OS - Operating System
(1 entry, 0 subcategories)
Photo - Digital Painting - Art
(2 entries, 0 subcategories)
SaaS
(0 entries, 0 subcategories)
TOTP
MFA or Multi-factor authorization is a way which enhances an organization's security by asking their users to identify themselves not only by using a username and password but also by other means like entering a token that is sent to their mobile phone, or by entering a code that gets generated in authenticator apps like Google Authenticator and FreeOTP. Here we'll look at implementing such flow using PHP.
How does it work?
IETF has described the algorithm here which can be used to generate time-based OTP generation. Basically the algorithm generates a 6 digit code using a secret key and time; and it always generates the same code for specific time period (E.g. 30 secs). The secret key is shared with third-party apps like Google authenticator using a QR code and now that app is also able to generate the same 6 digit code that is valid for 30 secs. Again when the the third-party app generates a new code, it will be same as the one that your application generated provided the secret key is same and time is in sync. The secret key should be long enough so that its not easily guessable.
We now need a mechanism to generate a QR code using a secret key so that it can be shared with the third-party authenticator app and a way to verify the code given by those app. We'll be using Spomky-Labs/otphp for this purpose. This library requires at least PHP 8.1.
The purpose of this article is to provide you an information on how things work and quickly create a POC (proof of concept) for better understanding.

Full description
https://www.lamadly.com/articles/how-to-implement-totp-in-web-application
(1 entry, 0 subcategories)
Vector Graphics
(1 entry, 0 subcategories)
Video Editing
(1 entry, 0 subcategories)

