Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcaptcha/glue
glue code to setup mCaptcha on your website
https://github.com/mcaptcha/glue
browser captcha javascript mcaptcha pow proof-of-work react rust svelte sveltejs typescript
Last synced: 2 days ago
JSON representation
glue code to setup mCaptcha on your website
- Host: GitHub
- URL: https://github.com/mcaptcha/glue
- Owner: mCaptcha
- Created: 2021-03-09T10:17:30.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-07-15T10:21:58.000Z (4 months ago)
- Last Synced: 2024-11-06T04:06:16.763Z (2 days ago)
- Topics: browser, captcha, javascript, mcaptcha, pow, proof-of-work, react, rust, svelte, sveltejs, typescript
- Language: TypeScript
- Homepage:
- Size: 4.98 MB
- Stars: 8
- Watchers: 3
- Forks: 7
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSES/Apache-2.0.txt
Awesome Lists containing this project
README
Glue
Code to embed mCaptcha widget[![0.1.0](https://img.shields.io/badge/TypeScript_docs-master-2b7489)](https://mcaptcha.github.io/glue/)
![Build)]()
[![codecov](https://codecov.io/gh/mCaptcha/glue/branch/master/graph/badge.svg)](https://codecov.io/gh/mCaptcha/glue)mCaptcha widget should be loaded within an `iframe`
1. The user clicks on the validation button
2. The widget(within the `iframe`) computes proof-of-work
3. Sends it to the mCaptcha (backend)instance
4. If proof is valid, mCaptcha instance will send a verification token
5. Widget sends parent webpage(webpage containing the `iframe`) a
message containing the verification token
6. Glue code receives message and embeds the token in a hidden input
field with name and ID `mcaptcha__token`The glue code is responsible receiving and embedding the token and
optionally create the `iframe` itself.## Framework Support
To provide a smooth migration experience, glue code is implemented for
the following frameworks. If you wish to see your framework supported,
please open an issue!| Framework | Source Code | Documentation | npm package name |
| -------------------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| Vanilla JavaScript(No Framework) | [packages/vanilla](./packages/vanilla) | [![0.1.0](https://img.shields.io/badge/TypeScript_docs-master-2b7489)](https://mcaptcha.github.io/glue/vanilla) | [![NPM](https://img.shields.io/npm/v/@mcaptcha/vanilla-glue.svg)](https://www.npmjs.com/package/@mcaptcha/vanilla-glue) |
| React JS | [packages/react](./packages/react) | [![0.1.0](https://img.shields.io/badge/TypeScript_docs-master-2b7489)](https://mcaptcha.github.io/glue/react/) | [![NPM](https://img.shields.io/npm/v/@mcaptcha/react-glue.svg)](https://www.npmjs.com/package/@mcaptcha/react-glue) |
| Next.JS | [packages/react](./packages/react) | [![0.1.0](https://img.shields.io/badge/TypeScript_docs-master-2b7489)](https://mcaptcha.github.io/glue/react/) | [![NPM](https://img.shields.io/npm/v/@mcaptcha/react-glue.svg)](https://www.npmjs.com/package/@mcaptcha/react-glue) |
| Svelte JS | [packages/svelte](./packages/svelte) | [![0.1.0](https://img.shields.io/badge/TypeScript_docs-master-2b7489)](https://mcaptcha.github.io/glue/svelte/) | [![NPM](https://img.shields.io/npm/v/@mcaptcha/svelte-glue.svg)](https://www.npmjs.com/package/@mcaptcha/svelte-glue) |## Core library
[![NPM](https://img.shields.io/npm/v/@mcaptcha/core-glue.svg)](https://www.npmjs.com/package/@mcaptcha/core-glue)
Framework-specific implementation provide markup(HTML) and hooks into
reactive state, the core functionality is implemented in
`@mcaptcha/core-glue`.To implement `glue` for an unsupported framework, checkout
[`@mcaptcha/core-glue`](https://www.npmjs.com/package/@mcaptcha/core-glue).## Funding
### NLnet
2023 development is funded through the [NGI0 Entrust
Fund](https://nlnet.nl/entrust), via [NLnet](https://nlnet.nl/). Please
see [here](https://nlnet.nl/project/mCaptcha/) for more details.