0.3.0 • Published 3 months ago

cloudflare-turnstile-widget v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Introduction

  • When the requirement is to utilize the Cloudflare's CAPTCHA service in a web component or shadow DOM implementation, Cloudflare's script for their CAPTCHA service only queries the document in the DOM tree which presents a problem that this component solves.
  • The <turnstile-widget> is a custom iframe that makes the use of cloudflare's CAPTCHA easier in your application without the above mentioned issue.

Usage

1️⃣   Install the library in your project.

npm install cloudflare-turnstile-widget

2️⃣   Import the package

import 'cloudflare-turnstile-widget';

3️⃣   Use the widget in your application.

<turnstile-widget site-key="1x00000000000000000000AA" size="compact" theme="dark"></turnstile-widget>

4️⃣   Use event listeners to receive messages from the widget.

document.querySelector('turnstile-widget').addEventListener('success', function (e) {
	console.log(e.detail.content);
});

Contributors

Thanks goes to these wonderful people:

License

Licensed under MIT

Based on omni-widget licensed under MIT

0.2.0-beta

3 months ago

0.3.0

3 months ago

0.2.0

3 months ago

0.0.13-beta

3 months ago

0.0.12-beta

3 months ago

0.1.0

3 months ago

0.0.11-beta

3 months ago

0.0.10-beta

3 months ago

0.0.9-beta

3 months ago

0.0.8-beta

3 months ago

0.0.7-beta

3 months ago

0.0.6-beta

3 months ago

0.0.5-beta

3 months ago

0.0.4-beta

3 months ago

0.0.3-beta

3 months ago

0.0.2-beta

3 months ago

0.0.1-beta

3 months ago