FriendlyCaptcha / friendly-challenge

The widget and docs for the proof of work challenge used in Friendly Captcha. Protect your websites and online services from spam and abuse with Friendly Captcha, a privacy-first anti-bot solution.
https://friendlycaptcha.com
MIT License
414 stars 61 forks source link

No access to autoWidget despite loading the scripts #242

Closed 92ahmed92 closed 11 months ago

92ahmed92 commented 11 months ago

I have a single page application and I am installing friendlyCaptcha into my TypeScript/C#-project. Using 2. Adding the widget and Option A: Using a script tag the widget is being displayed but I have no access to the friendlyChallenge.autoWidget. I need the access to be able to reset the widget when the form submitted is wrong.

92ahmed92 commented 11 months ago

After using just https://cdn.jsdelivr.net/npm/friendly-challenge@0.9.14/widget.min.js it worked. PS: it is not documented that one has to use just one script :/

merlinfuchs commented 11 months ago

I'm guessing you might forgot to set the type="module" and nomodule on the other javascript files resüectively. See https://docs.friendlycaptcha.com/#/installation