Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
@friendlycaptcha/sdk
Advanced tools
In-browser SDK for Friendly Captcha v2 (currently in preview only)
Readme
The SDK that is used to integrate Friendly Captcha into your website.
This is the code that runs on your website, inserting the captcha widget.
⚠️☝️ This is the SDK for Friendly Captcha V2 only, which is currently in preview only. You likely want to use the SDK for Friendly Captcha v1 instead.
# using npm
npm install @friendlycaptcha/sdk
# using yarn
yarn add @friendlycaptcha/sdk
You can then use it in your library.
import { FriendlyCaptchaSDK } from "@friendlycaptcha/sdk"
// Re-use this SDK if you are creating multiple widgets.
const sdk = new FriendlyCaptchaSDK();
// HTML element that you want to mount the widget under.
const mount = document.querySelector("#my-widget-mount");
// Create the widget
const widget = sdk.createWidget({
element: mount,
sitekey: "<your sitekey>"
});
The documentation can be found in our developer hub.
If you want to develop this SDK itself the following commands are useful
# install dependencies
npm install
# minimal build
npm run build
# build for distribution (also builds docs)
npm run build:dist
# run the basic unit tests
npm run test
We include more proper end-to-end tests in the sdktest tool folder.
We automatically generate markdown docs and translate these into files that are in a format that works for Docusaurus. You will then need to update the docs manually by deleting the old files and adding the new ones. Something like this:
rm -rf ../friendly-docs/docs/sdk/reference && mkdir ../friendly-docs/docs/sdk/reference && cp -r ./build/docs/docusaurus/ ../friendly-docs/docs/sdk/reference/
# print those files that would be changed
npm run license-check-and-add -- check
# add the headers
npm run license-check-and-add -- add
This is free software; you can redistribute it and/or modify it under the terms of the Mozilla Public License Version 2.0.
Contributions are welcome.
Prior to us being able to accept your contribution you will need to sign our CLA (Contributor License Agreement).
FAQs
In-browser SDK for Friendly Captcha v2 (currently in preview only)
The npm package @friendlycaptcha/sdk receives a total of 9 weekly downloads. As such, @friendlycaptcha/sdk popularity was classified as not popular.
We found that @friendlycaptcha/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.