Skip to content

Commit

Permalink
Constant for verify window
Browse files Browse the repository at this point in the history
  • Loading branch information
usp-npe committed Apr 21, 2022
1 parent 9a43330 commit c319122
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Services/TOTPService.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@

class TOTPService
{
const VERIFY_WINDOW = 1;

public function verify(string $secret, string $otp): bool
{
return TOTP::create($secret)->verify($otp, null, 1);
return TOTP::create($secret)->verify($otp, null, self::VERIFY_WINDOW);
}

public function createProvisionUri(string $secret, string $label): string
Expand Down

0 comments on commit c319122

Please sign in to comment.