Is it possible to use reCaptcha V3 in chrome extension. If yes, than how to implement it?
Currently I am implementing it and facing error
Refused to load the script 'https://www.google.com/recaptcha/api.js?render=Site_Key_Value' because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem:". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
The way I am implementing in popup-sign-in.html
is
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Titled Demo</title>
<script src="https://www.google.com/recaptcha/api.js?render=Site_Key_Value"></script>
</head>
<body>
<form>
<input type="email" name="email" id="email" placeholder="Email">
<input type="password" name="password" id="password" placeholder="Password">
<button type="submit">Sign In</button>
</form>
<script src="./popup-sign-in.js"></script>
<script>
grecaptcha.ready(function() {
grecaptcha.execute('Site_Key_Value', {action: 'action_name'})
.then(function(token) {
console.log(token);
});
});
</script>
</body>
Can any one tell me how can I implement it without facing any issue?