Developer preview
BlockiD for developers
Add “Sign in with BlockiD” to any site — self-sovereign login with zero-knowledge age / KYC proofs. Standard OpenID Connect: any OIDC library works.
Libraries
Any OpenID Connect library (code flow + PKCE S256).
JavaScript SDK in the repository (not yet published); other languages planned. To verify ZK proofs yourself: npm i snarkjs
code + PKCE S256
unlinkable across sites
age and KYC, no documents
apps registered by the team
Standard OIDC. Private by default.
- 01Start the login (server)
Create the client and an authorization URL. Save the code verifier, state and nonce in the session, then redirect.
// illustrative - the same flow with any OIDC library const client = new BlockIdClient({ issuer: process.env.BLOCKID_ISSUER, // this site's origin clientId, clientSecret, // omit secret for a public client redirectUri, }); const { url, codeVerifier, state, nonce } = await client.createAuthorizationUrl({ scopes: ["openid", "zk_age_over_18"] }); - 02Handle the callback & verify
Exchange the code and verify the ID token. sub is a pairwise pseudonym; age_over_18 is ReaperNet’s asserted answer.
// illustrative const { idToken, accessToken } = await client.exchangeCode({ code, codeVerifier }); const claims = await client.verifyIdToken(idToken, { nonce }); // claims.sub, claims.age_over_18 - 03 · optionalVerify the ZK proof yourself (optional)
Pin the issuer key and verify against your own policy — never trust anything embedded in the claim.
// illustrative const info = await client.getUserInfo(accessToken, { challenge: state }); const pinned = await client.issuerPublicKey(); // fetch once, pin const ok = await verifyZkClaim(info.verified_claims.age_over_18, { pinnedIssuerPublicKey: pinned, rpClientId: clientId, minAge: 18, expectedChallenge: state, });
Six endpoints. Nothing proprietary.
| Method | Path | Purpose |
|---|---|---|
| GET | /.well-known/openid-configuration | Discovery |
| GET | /.well-known/jwks.json | ES256 keys for id_token signatures and BlockiD share statements |
| GET | /api/oidc/authorize | Code + PKCE S256; shows the consent screen |
| POST | /api/oidc/token | Returns id_token + access token |
| GET | /api/oidc/userinfo | Scope-gated claims + ZK proofs; ?zk_challenge= binds a proof |
| GET | /api/oidc/zk-issuer | Issuer public key to pin |
Ask only for what you need.
openidRequired. A pairwise sub per site.
profileName and country.
emailEmail and email_verified.
walletThe user’s ReaperNet wallet address.
kycKYC level only — never the documents.
zk_age_over_18 · zk_age_over_21A zero-knowledge age proof.
zk_kyc_verifiedA zero-knowledge “KYC verified” proof.
- Pin the issuer key from
/api/oidc/zk-issuer; never trust an embeddedissuerPublicKey. - Send a fresh challenge per request — it stops forwarding and replay.
- Request only the scopes you need. Users see them and can revoke.
BlockiD is issued by ReaperNet. During the developer preview, apps are registered by the team — contact us or use the developer console.