Skip to content

Code Validation

Đorđe Jocić edited this page Jan 7, 2019 · 2 revisions

Validating provided 6-digit codes is extremely simple, you just need to instantiate the validator and utilize the "isCodeValid" method.

$validator = new Jocic\GoogleAuthenticator\Validator();

if (!$validator->isCodeValid($code, $account))
{
    // Handle Invalid Code
}
Clone this wiki locally