WorkPair Registry
Developer · Verifier

Integrate Login with WorkPair (OIDC and PAR)

Use the authorization code flow with PKCE and pushed authorization requests to receive a signed identity proof.

Who it’s for
Developers adding Login with WorkPair to an app.
What you need first
Time needed
30 minutes

How it works

Login with WorkPair, step by step
  1. Your app’s server pushes the sign-in request to WorkPair (PAR) and gets a request URI. Proof requests never travel in the browser address.
  2. Your app sends the person’s browser to WorkPair with that request URI.
  3. The person signs in and consents to exactly what is shared.
  4. WorkPair sends the browser back to your app with a one-time code.
  5. Your server exchanges the code for an ID token and, if asked, a signed proof and its hash.
  6. Anyone holding the hash can check the proof’s status at workpair.io/verify.

Steps

  1. Read the discovery document at /.well-known/openid-configuration.

  2. From your server, push the request to /oidc/par (client authentication, PKCE S256, scope=openid wp_proof, and a wp_proof_request naming what you need). You get a request_uri.

  3. Optional scopes: email (the person’s verified sign-in email, email + email_verified) and wp_id (their public 13-character WorkPair ID, wp_id). Each is released only if the person ticks it; sub stays pairwise.

  4. To learn the person’s organization, add organization: {roles, org_id, require_verified} to wp_proof_request (roles from owner, admin, member; org_id limits it to one organization). The person picks one; the proof’s credentialSubject.organization and the ID token’s wp_org carry id, legal_name, domain, role, verified, verified_at, status (active, suspended, closed), verification (verified, pending, needs_reverification, unverified), profile (country, region, sector, legal_form, size, and website only for a verified domain) and updated_at. Show them read-only: the organization edits them on WorkPair. With no qualifying organization you get error=access_denied&error_description=no_matching_organization.

  5. To keep an organization current, call GET /v1/oidc/organizations/{orgId} (discovery: wp_organization_endpoint) with your client credentials (client_secret_basic). You get the same object without role, as it stands now, while your client holds a live proof naming that organization; otherwise 404.

  6. Send the person’s browser to /oidc/authorize?client_id=…&request_uri=…. They consent on WorkPair.

  7. Exchange the code at /oidc/token with your code_verifier. You receive the ID token, the signed proof and wp_proof_hash.

  8. Verify tokens against /.well-known/jwks.json. The developer guide lists every claim and the proof format.

What happens next

  • Check a proof’s status at any time (see Check a proof’s status by API).
  • Subscribe to organization.membership_revoked (someone left, was removed or changed role), organization.status_changed ({orgId, verified, status, verification}: verification changed, including needs_reverification; suspension; closure) and organization.profile_changed ({orgId, changed, updated_at}: then fetch the organization again) to keep what you show current.
  • Your workspace wallet pays for sign-ins; keep it funded (auto-recharge in Wallet). If it can’t pay, people see that your application can’t accept WorkPair sign-ins right now.
  • Proofs can disclose the legal name and whether and when the identity was verified, plus credentials. They never include a date of birth: date-of-birth or other attribute checks are refused.

Common problems and fixes

invalid_grant.
Codes are single-use and short-lived, and the code_verifier must match the challenge.

Still stuck? Write to support@workpair.io and say which guide and step you were on. WorkPair will never ask for your passphrase, a code or an API key.

Integrate Login with WorkPair (OIDC and PAR) · How-To Guide · WorkPair