Skip to content

Javascript toolkit to interact with the World ID protocol. Building the Identity SDK.

License

Notifications You must be signed in to change notification settings

ehsidawi/idkit-js

 
 

Repository files navigation

IDKit JS

IDKit is the new toolkit for identity online. With IDKit you can easily interact with the World ID Protocol.

🚀 Getting started

Integration is very straightforward. Follow the relevant steps below.

yarn add @worldcoin/idkit
# or
npm i @worldcoin/idkit
# or
pnpm install @worldcoin/idkit
import { IDKitWidget } from "@worldcoin/idkit";

<IDKitWidget actionId="get_this_from_the_dev_portal" signal="my_signal" handleVerify={verifyProof}>
  {({ open }) => (
    {/* You can render whatever you want here, and call open() to open the widget */}
    <button onClick={open}>Click me</button>
  )}
</IDKitWidget>

If you are not using React or want to look at additional options (like rendering the component without any children), the useIDKit hook and more, head over to the docs.

import { useIDKit } from "@worldcoin/idkit";

const { open, setOpen } = useIDKit({
	signal: "my_signal",
	handleVerify: verifyProof,
	actionId: "get_this_from_the_dev_portal",
	walletConnectProjectId: "get_this_from_walletconnect_portal",
});

🔒 Verifying the IDKit response

IDKit exposes the handleVerify option for your app to perform additional verification on the returned response, often a call to an API that ensures the proof is valid.

Warning Make sure you verify the proof, and that you don't do it client-side!

Optionally, IDKit also provides an onSuccess option, which you can use if your app needs to execute some code after verification succeeds.

About World ID

World ID is the privacy-first identity protocol that brings global proof of personhood to the internet. More on World ID in the announcement blog post.

World ID lets you seamlessly integrate authentication into your app that verifies accounts belong to real persons through Sign in with Worldcoin. For additional flexibility and cases where you need extreme privacy, Anonymous Actions lets you verify users in a way that cannot be tracked across verifications.

Follow the Quick Start guide for the easiest way to get started.

📄 Documentation

All the technical docs for the Wordcoin SDK, World ID Protocol, examples, guides can be found at https://docs.worldcoin.org/

🧑‍💻 Developing locally

If you want to develop or contribute to this project, please refer to the development instructions in the idkit README.

About

Javascript toolkit to interact with the World ID protocol. Building the Identity SDK.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 87.9%
  • JavaScript 7.7%
  • HTML 2.4%
  • CSS 2.0%