public function confirmSecret()
    {
        $secret = $this->owner->{$this->secretAttribute};
        if (empty($secret)) {
            $this->owner->addError($this->codeAttribute, Yii::t('yii', 'The secret is empty.'));
        } else {
            $this->otp->setSecret($secret);
            if (!$this->secretConfirmed()) {
                $this->owner->addError($this->codeAttribute, Yii::t('yii', 'The code is incorrect.'));
            }
        }
    }