I'm working on a local javascript application that interact with a server in ajax and I want to securize my creation form with hcaptcha.
<script src='https://js.hcaptcha.com/1/api.js' async defer></script>
<h2>Create an account</h2>
<form class="create-account" method="post">
...
<div class="h-captcha" data-sitekey="..."></div>
<p><button type="submit">Create account</button></p>
</form>
I got javascript errors:
TypeError: ke.data.kernel.save.user_init is not a function
SecurityError: Permission denied to access property "document" on cross-origin object
And query is invalid
curl 'https://hcaptcha.com/checksiteconfig?v=..&host=&sitekey=...&sc=1&swa=1'
return 403 Invalid Data
Because of it's a local app, there is no host.
Is there a way to use hcaptcha in a local app ?