Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
code: FAILED_PASSED_CAPTCHA
});
}
const { login, password, phone } = this.options;
const { action, fields } = parseFormField($);
fields.email = login || phone;
fields.pass = password;
if ('captcha_sid' in fields) {
const src = $('.oauth_captcha').attr('src') || $('#captcha').attr('src');
const { key, validate } = await this.vk.callbackService.processingCaptcha({
type: CaptchaType.IMPLICIT_FLOW_AUTH,
sid: fields.captcha_sid,
src
});
this.captchaValidate = validate;
fields.captcha_key = key;
}
debug('Fields', fields);
const url = new URL(action);
url.searchParams.set('utf8', '1');
const pageResponse = await this.fetch(url, {