# php-package-google-authenticator **Repository Path**: wupz/php-package-google-authenticator ## Basic Information - **Project Name**: php-package-google-authenticator - **Description**: Google Authenticator PHP Library - **Primary Language**: PHP - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-05-12 - **Last Updated**: 2021-05-09 ## Categories & Tags **Categories**: oauth-dev **Tags**: None ## README ### Google Authenticator PHP Library - command ``` composer require wupz/google-authenticator ``` - example ```php $gc = new wuweiit\GoogleAuthenticator(); /** * 生成二维码 */ $secret = $gc->createSecret(16); echo 'secret:' . $secret . PHP_EOL; echo 'qrurl:' . $gc->getQRCodeGoogleUrl('吴强强', $secret, $title = 'wuweiit', $params = array()) . PHP_EOL; /** * 验证Code */ $code = $gc->getCode($secret); echo 'code:' . $code . PHP_EOL; echo 'status:' . $gc->verifyCode($secret , $code); ```