https://github.com/johnstyle/google-authenticator
Google Authenticator
https://github.com/johnstyle/google-authenticator
authentication authenticator google php qrcode two-factor two-factor-authentication
Last synced: 10 months ago
JSON representation
Google Authenticator
- Host: GitHub
- URL: https://github.com/johnstyle/google-authenticator
- Owner: johnstyle
- License: gpl-3.0
- Created: 2014-09-02T19:38:20.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-12-04T20:48:43.000Z (about 9 years ago)
- Last Synced: 2025-03-23T22:24:37.172Z (10 months ago)
- Topics: authentication, authenticator, google, php, qrcode, two-factor, two-factor-authentication
- Language: PHP
- Size: 25.4 KB
- Stars: 22
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#Google-Authenticator [](https://flattr.com/submit/auto?user_id=Johnstyle&url=https%3A%2F%2Fgithub.com%2Fjohnstyle%2Fgoogle-authenticator%2F)
[](https://packagist.org/packages/johnstyle/google-authenticator)
[](https://packagist.org/packages/johnstyle/google-authenticator)
[](https://travis-ci.org/johnstyle/google-authenticator)
[](https://www.versioneye.com/user/projects/541442669e162254b40000e5)
[](https://insight.sensiolabs.com/projects/1ca02d65-8610-44ac-ba40-84390b0873b5)
Google Authenticator
##Usage
###Step 1 - Register application
```PHP
$google = new GoogleAuthenticator();
// Register application
echo $google->getQRCodeUrl('MyApplicationName');
// Save secret Key
$secretKey = $google->getSecretKey();
```
###Step 2 - Verify Code
```PHP
$google = new GoogleAuthenticator($secretKey);
// User submit code
$userSubmitCode = '';
// Verify Code
if ($google->verifyCode($userSubmitCode)) {
// OK
}
```
##Demonstration
[Demonstration](http://github.johnstyle.fr/repository/johnstyle/google-authenticator/)