How to create google two factor authentication using php?
问题 I want to use Google 2FA in my PHP project. The user needs to enter the 6 digit 2fa code while logging in. May you draw some tips on which direction to take? 回答1: Step 1) Create a unique secret code of length 16 characters. PHPGangsta provides wrapper class for Google Authenticator. You can download using composer. curl -sS https://getcomposer.org/installer | php php composer.phar require phpgangsta/googleauthenticator:dev-master Use the below code to generate the secret code. <?php require