mCaptcha widget should be loaded within an iframe
- The user clicks on the validation button
- The widget(within the
iframe
) computes proof-of-work - Sends it to the mCaptcha (backend)instance
- If proof is valid, mCaptcha instance will send a verification token
- Widget sends parent webpage(webpage containing the
iframe
) a message containing the verification token - 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.
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 | ||
React JS | packages/react | ||
Next.JS | packages/react | ||
Svelte JS | packages/svelte |
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
.
2023 development is funded through the NGI0 Entrust Fund, via NLnet. Please see here for more details.