Skip to content
LogoLogo

World.Server.verifier

Require a verified human

Creates a request verifier for a trusted issuer’s world-id attestation.

Usage

import * as  from 'mppx/extensions/identity/world'
 
const  = ..({
  : [..., ...],
  : 'https://api.example.com',
  : 'https://identity.example.com',
})

Pass human in a route's identity: [human]. The API verifies the issuer's signature locally and hosts no World IdP routes. Use World.Issuer.create to run the issuer yourself.

Return type

Identity.Verifier<World.VerifiedHuman>. A valid value contains:

FieldTypeMeaning
acr (optional)stringWorld IdP authentication class, if attested.
expiresAtDateAttestation expiry.
id (optional)stringAttestation jti.
issuerstringAttestation issuer URL.
subjectstringPseudonymous human ID. Store with issuer; cross-origin stability depends on issuer policy.

Missing or invalid proofs return 401 with Identity-Attestation-Required: world-id;issuer="https://identity.example.com", telling the client prover which type and issuer to acquire; a rejected authentication class returns 403; unavailable issuer keys return 503. See attestation verification behavior.

Parameters

Configuration type: World.Server.verifier.Config.

acr (optional)

  • Type: readonly string[]

Accepted authentication classes. Defaults to any attested class. An empty array throws TypeError.

audience

  • Type: string | Attestation.Server.verifier.AudienceFunction

Public API origin. Prefer a fixed string; the request-derived function form is deprecated.

clockTolerance (optional)

  • Type: number

Clock tolerance in seconds; defaults to 60.

fetch (optional)

  • Type: typeof globalThis.fetch

Defaults to globalThis.fetch for JWKS discovery. Ignored with keyResolver.

issuer

  • Type: string

Trusted World ID attestation issuer URL, not https://auth.world.org.

keyResolver (optional)

  • Type: Attestation.KeyResolver

Defaults to the issuer’s JWKS. Use a self-hosted issuer’s keyResolver in process.

maxAge (optional)

  • Type: number

Oldest accepted attestation in seconds since issuance. Defaults to the token’s own expiry.

Constants

World.Constants (import from mppx/extensions/identity/world):

PropertyValue
acr.orbhttps://world.org/oidc/acr/orb
acr.orbFacehttps://world.org/oidc/acr/orb-face
acr.selfiehttps://world.org/oidc/acr/selfie
acr.selfieFacehttps://world.org/oidc/acr/selfie-face
attestationTtl3600 seconds
clockTolerance60 seconds
devicePath/world/device
interval5 seconds
requestTimeout10000 milliseconds
retryDelay60 seconds
slowDown5 seconds
tokenPath/world/token
typeworld-id
worldIssuerhttps://auth.world.org
worldSandboxIssuerhttps://sandbox.auth.world.org