public function validateCode(User $user, string $code): bool
    {
        $totp = TOTP::create($this->getUpperUnpaddedSecretForUser($user));

        return $totp->verify($code);
    }
public function validateCode(User $user, string $code): bool
    {
        $totp = TOTP::create($this->getUpperUnpaddedSecretForUser($user));

        return $totp->verify($code);
    }
public function validateCode ( User $ user , string $ code ) : bool { $ totp = TOTP :: create ( $ this -> getUpperUnpaddedSecretForUser ( $ user ) ) ; return $ totp -> verify ( $ code ) ; }
Validates the code which was entered by the user.
Validates the code which was entered by the user .