SDK QuickStart

Add Sign in with Humanity to your React app in under 10 minutes — same OAuth pattern as Google or GitHub, with biometric human verification built in.

This guide uses the sandbox environment. You'll need a mock credential to complete it — Generating Mock Credentials

The easiest way to integrate with Humanity is using our @humanity-org/react-sdk

By the end of this guide, you have a React app where users authenticate with the Sign in with Humanity button and their biometric verification status shows up on screen. Under 10 minutes, start to finish.

Sign in with Humanity works like Sign in with Google — same OAuth flow, same redirect pattern. What you get back is different: not just an attestation, but a signed biometric credential tied to a unique person.

Before you start

You need:

How this Quickstart works

  1. Register your app in the Developer Portal and get credentials

  2. Install the React SDK

  3. Configure your environment

  4. Wrap your app with HumanityProvider

  5. Add a sign-in button and biometric verification

  6. Run the app

Quick Start

1

Get your credentials

Go to the Humanity Developer Portal and create an app. You'll need:

  • clientId generated as you create the app — e.g. app_xxx

  • redirectUri — the OAuth callback URL you'll register (e.g. http://localhost:3000/callback)

Under Settings register the redirectUri in this case http://localhost:3000/callback .

Also under Settings you'll also select which scopes your app will request. For this example we need to request Identity Information (identity:read) that contains Palm Verifed and OpenID Connect (openid).

2

Create the project and install dependencies

Scaffold a new Vite + React + TypeScript project:

When prompted "Install with bun and start now?" select "no" then

Install the React SDK and its dependencies:

The SDK uses Node crypto APIs internally — vite-plugin-node-polyfills makes these available in the browser. Update vite.config.ts:

3

Configure your environment

Create a .env.local file at the project root:

4

Wrap your app with HumanityProvider

Replace src/main.tsx with:

BrowserRouter must wrap HumanityProvider — the SDK uses the router to handle the OAuth return.

5

Add authentication and biometric verification

Replace src/App.tsx with:

Replace src/index.css with:

6

Run it

Open http://localhost:3000. Click the Sign-in with humanity button, complete the OAuth flow, and you'll land back on the home page with the biometric status visible.

Next Steps

Not building in React, or need full OAuth control? → @humanity-org/connect-sdk

Last updated