Guide for adding a second authentication factor to an existing application with the ESET Secure Authentication PHP SDK.
This getting started guide explains what is required to add a second authentication factor to an existing application using the ESET Secure Authentication PHP SDK. The SDK integrates with existing systems through a client-side library, and the guide walks through obtaining the SDK, running the sample code and integrating it into an existing platform.
The document covers activating the SDK license to obtain an API Key and Shared Secret, running the sample application, and the integration steps: extending the user database with 2FA fields, implementing the IUserStorage interface with LoadUser and SaveUser, updating the login UI to accept OTPs, updating the user management UI via the TwoFactorUser class, and optional components such as logging, auditing and an alternative SMS gateway.
| Required SDK credentials | API Key and Shared Secret |
|---|---|
| 2FA data storage format | Unicode string of varying length |
| Recommended MySQL datatype | TEXT |
| Recommended Postgres datatype | character_data |
| Recommended Oracle datatype | NCLOB |
| Recommended Microsoft SQL Server datatype | nvarchar(max) |
You need an API Key and a Shared Secret, which are derived from your ESET Secure Authentication license.
Download the sample application .zip file from the SDK samples page and follow the instructions in the included README.txt.
The IUserStorage interface, which uses the LoadUser and SaveUser methods.
Yes, by implementing the ITextMessageSender interface.