johnstyle/google-authenticator

PHP 5 Google Authenticator

v1.0.8 2015-01-05 19:47 UTC

This package is auto-updated.

Last update: 2024-04-08 05:58:04 UTC


README

#Google-Authenticator Flattr this

Latest Stable Version Total Downloads Build Status Dependency Status SensioLabsInsight

Google Authenticator

##Usage

###Step 1 - Register application

$google = new GoogleAuthenticator();

// Register application
echo $google->getQRCodeUrl('MyApplicationName');

// Save secret Key
$secretKey = $google->getSecretKey();

###Step 2 - Verify Code

$google = new GoogleAuthenticator($secretKey);

// User submit code
$userSubmitCode = '';

// Verify Code
if ($google->verifyCode($userSubmitCode)) {

    // OK
}

##Demonstration Demonstration