src/Traits/TwoFactorAuthenticatesUsers.php
protected function isValidTwoFactorTotp(AuthenticatableTwoFactorContract $user, int $token): bool
    {
        $totpProvider = app(Google2FA::class);
        $secret = array_get($user->getTwoFactor(), 'totp.secret');

        return mb_strlen($token) === 6 && $totpProvider->verifyKey($secret, $token);
    }
protected function isValidTwoFactorTotp(AuthenticatableTwoFactorContract $user, int $token): bool
    {
        $totpProvider = app(Google2FA::class);
        $secret = array_get($user->getTwoFactor(), 'totp.secret');

        return mb_strlen($token) === 6 && $totpProvider->verifyKey($secret, $token);
    }
protected function isValidTwoFactorTotp ( AuthenticatableTwoFactorContract $ user , int $ token ) : bool { $ totpProvider = app ( Google2FA :: class ) ; $ secret = array_get ( $ user -> getTwoFactor ( ) , 'totp.secret' ) ; return mb_strlen ( $ token ) === 6 && $ totpProvider -> verifyKey ( $ secret , $ token ) ; }
Determine if the given token is a valid TwoFactor TOTP token.

@param \Rinvex\Auth\Contracts\AuthenticatableTwoFactorContract $user
@param int                                                     $token

@return bool
Determine if the given token is a valid TwoFactor TOTP token .