Skip to main content
Didit Authentication signs your own users in to your application: sign-up, sign-in, passkeys, email and phone codes, social and company single sign-on, multi-factor authentication and sessions, with bot protection and optional identity verification built in. People sign in on pages Didit hosts in your brand, or on your own screens through the SDKs, and your backend receives short-lived signed tokens that it verifies against your application’s public keys.
Authentication is turned on per application. Every Sandbox application has it on from the start, and you can turn products on or off there freely. A Live application turns it on from the Products page of the console. Until it is on, every runtime route for that application returns 404.
Authentication signs your customers into your application. It is separate from signing into the Didit console or creating a Didit developer account. It is also separate from verifying someone’s identity. Use Authentication alone, or combine it with Identity verification and Transaction monitoring. Signing in does not approve a verification or authorize a payment. Your backend makes those decisions from each product’s own result. New to Didit Authentication? Start with the quickstart for a first sign-in in about 10 minutes, then read the integration guide for architecture, sessions and the go-live checklist.

How it works

Turn it on and configure it

Turn on Authentication for the application, register your redirect URLs, and pick the sign-in methods, security and session settings, bot protection and branding you want. Do it in the console, or from your own code with the management API.

Send people to sign in

Your app opens the hosted sign-in page with an SDK, or runs the steps on your own screens. Didit signs the person in or up with the methods you enabled, asks for a second factor when your MFA policy requires one, runs your bot protection policies, and runs a verification at sign-up when you ask for one.
Didit's hosted sign-in page in a customer's brand, in light and dark mode, with a passkey button, email and password fields, and links to sign in with an emailed link, a phone number or single sign-on

The hosted sign-in page in your brand, following the person's device in light or dark mode.

Exchange the code for tokens

The person returns to your redirect URL with a one-time code. Your app exchanges it for a short-lived access token, an ID token and a refresh token that rotates on every use. See tokens and JWKS.

Protect your backend

Your backend verifies the access token on every request against your application’s published keys. Before a sensitive action, it checks the live session, and it can ask for a step-up verification such as a selfie before a payout.

Watch and act

Every sign-up, sign-in and failure appears on the person’s timeline in the console, next to their verifications and transactions. Subscribe to the auth.* webhooks, review sign-ins and sessions in the console, and block, unlock or sign people out when you need to.
The Authentication overview in the Didit Business Console, with monthly active users, sign-ins, success rate and passkey adoption for the last 30 days

Authentication > Overview in the Business Console.

Sign-in origin and issuer

Each application gets its own sign-in origin and its own token issuer. Live and sandbox applications are separate: they have separate origins, settings and identities. The flow is OAuth 2.0 authorization code with PKCE (S256 only):
  1. Your app opens {origin}/sign-in with redirect_uri, state, code_challenge and code_challenge_method=S256.
  2. The hosted page signs the person in or up with the methods you enabled, including any required second factor.
  3. The browser returns to your redirect_uri with code and state.
  4. Your app exchanges the code at POST {origin}/token/ for an access token, an ID token and a refresh token.
See tokens and JWKS for the token contract and sign-in methods for each method.

Key capabilities

Choose your platform

JavaScript

@didit-protocol/auth: hosted sign-in, session, token and logout.

React

@didit-protocol/auth-react: provider, hooks and components.

Next.js

@didit-protocol/auth-nextjs: HttpOnly cookies, proxy and auth().

iOS

DiditAuth Swift package: system browser, passkeys and Keychain.

Android

me.didit:didit-auth: Custom Tab, passkeys and Keystore.

React Native

@didit-protocol/auth-react-native: hosted sign-in, passkeys and protected sessions on Android and iOS.

Flutter

didit_auth: hosted sign-in, passkeys and protected sessions on Android and iOS.
@didit-protocol/signals (device signals) is installed for you by @didit-protocol/auth.

Prepare your application

  1. Turn on Authentication on the Products page of the console. A Sandbox application has it on from the start, so build and test there first. A Live application turns it on the same way, in one click: there is nothing to request and no wait.
  2. Register your exact redirect URLs (up to 50) and the browser allowed_origins (up to 50) that call the runtime API.
  3. Enable the sign-in methods you want to offer.
  4. Choose your session and password settings (see below).
  5. Test sign-up, sign-in, forgot password, MFA, session expiry and logout before you go live.
A passkey belongs to its origin. If you later activate a custom domain, people must enroll their passkeys again.

Redirect URLs

Didit only returns a person to an address you registered. Register yours in the console, under Authentication > Security and sessions > Redirect URLs and allowed origins. The redirect_uri in a sign-in request must match a registered URL character by character: scheme, host, port, path and query. A different port, a trailing slash or a different letter case is a different address. Wildcards, fragments, credentials in the URL and custom schemes are rejected. When the address isn’t registered, Didit never redirects to it. {origin}/sign-in answers 400 with a page that says what to register and where, and POST {origin}/authorize/ answers 400 {"error": "invalid_redirect_uri"}.

Local development

Test on your own machine with your sandbox application:
  1. Register your callback with its port, for example http://localhost:3000/auth/callback.
  2. If browser code calls the runtime API, for example to exchange the code at POST {origin}/token/, add the origin to Allowed origins too: http://localhost:3000, with no path and no trailing slash.
  3. Start sign-in on your sandbox origin, https://<slug>.sandbox.auth.didit.me, with your pk_test_... key.
localhost, 127.0.0.1 and [::1] are separate addresses, and so is each port. Register each one you use. Live applications never accept http://. Before you go live, register your production https:// callback on your live application.

Application settings

You manage these settings in the console, or by API: the console session, an owner-approved management grant, or an API key with the authentication scope can write them, as setting up by API shows.

Keep one person across products

Every identity carries a vendor_data value. It is the external_id you supplied when you imported the person, or the Didit identity ID otherwise. It appears in the access token, the ID token and GET session/. Use the same value as vendor_data when you create verification sessions and submit transactions. Authentication events then land on the same person in the console as their verifications and transactions. See events and webhooks. Derive vendor_data on your backend from a verified token, never from an unchecked browser field. Use the shared integration prompt for any combination. Read bot protection for the policies that run at sign-in.

Pricing

Authentication is billed by monthly active user on every plan, Free included. The first 50,000 active users of each month are free. Each active user above 50,000 in a month costs $0.02 up to 100,000, $0.018 up to 1,000,000, $0.015 up to 10,000,000 and $0.012 above. An active user is a person who signs in during the month and comes back at least a day after signing up. People who sign up and never return are free. Each person counts once a month in each live application they sign in to, and the tiers apply to the total across your organization. Sandbox applications are free and do not count toward the allowance. Sign-in events and webhooks are not billed per event, and agent access is included on every plan. A verified identity check at sign-up or before a sensitive action is billed as a verification at its own price: $0.10 for liveness or selfie login, and $0.33 for a full ID check, at list. See pricing for every rate.

Next steps

Quickstart

Sign a person in with the hosted page and verify the token in about 10 minutes.

Integration guide

Architecture, token storage, sessions, step-up and the go-live checklist.

Sign-in methods

Passkeys, codes, social, company SSO, MFA and password reset.

Verified identity

Verify people at sign-up and again before payouts.

Bot protection

Stop bots, credential stuffing and account takeover at sign-in.

Console guide

Every page of the Authentication section in the Business Console.
Last modified on November 26, 2026