IDKit Integration Patterns for HTML/JavaScript
mainThe with-html examples demonstrate two primary ways to integrate IDKit into vanilla HTML/JavaScript applications:
- IDKit Widget (
index.html): Uses the standard IDKit Widget modal to handle the World ID verification flow. This is the simplest integration pattern for most use cases. - Session API (
session-example.html): Uses the Session API, which provides more granular control over state and UI management, allowing you to manage the modal and verification lifecycle manually.
⚠️ Security Note: These examples demonstrate how to retrieve a user's ZK-proof. In a production environment, you must verify the proof in your backend system to ensure security.