Commit 3e4d2a8f authored by Viacheslav Pavlov's avatar Viacheslav Pavlov Committed by Oleksii Savran
Browse files

Fixed captcha serialization

parent 4040d698
......@@ -93,7 +93,7 @@ export class LoginService {
const qs = QueryString.stringify({
'email': email || undefined,
'g-recaptcha-response': gRecaptchaResponse || undefined,
'g-recaptcha-response': JSON.stringify(gRecaptchaResponse) || undefined,
}, {});
const apiUrl = URL_RESET_PASSWORD + (qs ? `?${qs}` : '');
// console.log(`Fetching from ${apiUrl}`);
......@@ -116,7 +116,7 @@ export class LoginService {
public static cancelValidation(tokenUuid: string, gRecaptchaResponse?: string, xhrConfig?): Promise<boolean> {
const qs = QueryString.stringify({
'g-recaptcha-response': gRecaptchaResponse || undefined,
'g-recaptcha-response': JSON.stringify(gRecaptchaResponse) || undefined,
}, {});
const apiUrl = URL_CANCEL_VALIDATION.expand({ tokenUuid }) + (qs ? `?${qs}` : '');
// console.log(`Fetching from ${apiUrl}`);
......@@ -144,7 +144,7 @@ export class LoginService {
const qs = QueryString.stringify({
'key': key || undefined,
'password': password || undefined,
'g-recaptcha-response:': gRecaptchaResponse || undefined,
'g-recaptcha-response:': JSON.stringify(gRecaptchaResponse) || undefined,
}, {});
const apiUrl = URL_UPDATE_PASSWORD.expand({ tokenUuid }) + (qs ? `?${qs}` : '');
// console.log(`Fetching from ${apiUrl}`);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment