In the backend we have following code written in reCaptcha.jsw file.
export async function verifyCaptcha(gToken, ipAddr) {
let boolSuccess = false ;
const strSecretKey = “balalavhsvvcvcguvcaMutthuH” ;
const strUrl = “https://www.google.com/recaptcha/api/siteverify?secret=” + strSecretKey + “&response=” + gToken;
console.log( "url: " , strUrl);
const httpResponse = await fetch(strUrl, { method: ‘post’ });
let json;
console.log( "response verified : " , httpResponse.json())
if (httpResponse.ok) {
json = await httpResponse.json();
boolSuccess = await json.success;
}
return json;
}
the above code is throwing following error,
dlj4w.js:1 Uncaught (in promise) Error: Unable to handle the request. Contact the site administrator or view site monitoring logs for more information.
And we are referring procedure from
“https://girizano.wixsite.com/codecorner/post/google-recaptcha”
Please assist us if we are making any mistake over here.