How it works
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):
- Your app opens
{origin}/sign-inwithredirect_uri,state,code_challengeandcode_challenge_method=S256. - The hosted page signs the person in or up with the methods you enabled, including any required second factor.
- The browser returns to your
redirect_uriwithcodeandstate. - Your app exchanges the code at
POST {origin}/token/for an access token, an ID token and a refresh token.
Choose your platform
JavaScript
Hosted sign-in, callback, session and logout.
React
Client state and protected application views.
Next.js
Server sessions, callback routes and cookies.
iOS
System browser and secure token storage.
Android
Browser authorization and app callbacks.
React Native
Native authentication wrapper preparation.
Flutter
Native authentication wrapper preparation.
Prepare your application
- Ask Didit to turn on Authentication for your application. Test in a sandbox application first.
- Register exact
redirect_uris(up to 50) and the browserallowed_origins(up to 50) that call the runtime API. Redirects must use HTTPS. Wildcards, fragments and credentials are rejected.http://localhostis accepted only for sandbox applications. - Enable the sign-in methods you want to offer. Didit ID Wallet is always on.
- Choose your session and password settings (see below).
- Test sign-up, sign-in, forgot password, MFA, session expiry and logout before you go live.
Application settings
You manage these settings in the console, or with an authorized console session that haswrite:authentication.
Keep one person across products
Every identity carries avendor_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.