core-bundle/src/Security/TwoFactor/Authenticator.php
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.