Skip to main content

API Reference

OIDC Endpoints

EndpointMethodDescription
/.well-known/openid-configurationGETOIDC discovery document
/authPOSTAuthorization endpoint
/tokenPOSTToken exchange
/jwksGETJSON Web Key Set
/meGETUserInfo endpoint
/regPOSTDynamic client registration
/token/introspectionPOSTToken introspection
/token/revocationPOSTToken revocation
/session/endPOSTRP-Initiated Logout
/interaction/{uid}GETGet interaction details (nonce, client metadata)
/interaction/{uid}POSTSubmit SIWE signature for verification

Scopes

ScopeDescription
openidRequired. Returns sub claim with the user's Ethereum identity
profileReturns ENS name (preferred_username) and avatar (picture)
siweReturns the raw SIWE message and signature used for authentication

Identity Claims

ClaimSourceScope
subeip155:{chainId}:{checksumAddress}openid
preferred_usernameENS name (if set) or Ethereum addressprofile
pictureENS avatar URL (if set)profile
siwe_messageOriginal SIWE message textsiwe
siwe_signatureHex-encoded cryptographic signaturesiwe

The sub claim uses the CAIP-10 account ID format: eip155:{chainId}:{checksumAddress}. For example: eip155:1:0x742d35Cc6634C0532925a3b844Bc9e7595f2bD95.

Dynamic Client Registration

Register a new client by sending a POST request to /reg:

curl -X POST http://localhost:3000/reg \
-H 'Content-Type: application/json' \
-d '{"redirect_uris": ["https://myapp.com/callback"]}'

Response:

{
"client_id": "5e06b7ec-4202-4eea-86f9-9aeed30a460d",
"registration_access_token": "sEC5pfNmh...",
"registration_client_uri": "http://localhost:3000/reg/5e06b7ec-4202-4eea-86f9-9aeed30a460d",
"redirect_uris": ["https://myapp.com/callback"]
}

You can include optional metadata in the registration request:

{
"redirect_uris": ["https://myapp.com/callback"],
"client_name": "My App",
"logo_uri": "https://myapp.com/logo.png",
"client_uri": "https://myapp.com",
"policy_uri": "https://myapp.com/privacy",
"tos_uri": "https://myapp.com/terms"
}

Alternatively, pre-register clients via the NUXT_OIDC_DEFAULT_CLIENTS environment variable (see Deployment Guide).

Token TTLs

Token TypeTTL
Authorization Code60 seconds
Access Token1 hour
ID Token1 hour
Session24 hours
Grant24 hours
Interaction10 minutes

Interaction Flow

The provider uses a web-based interaction flow for SIWE authentication:

  1. Authorization request — client redirects user to /auth with standard OIDC parameters
  2. Interaction page — provider creates an interaction session and renders a wallet-connect UI
  3. SIWE signing — the user connects their wallet and signs a SIWE message. The interaction UID is hex-encoded and used as the SIWE nonce (to stay EIP-4361 compliant with the alphanumeric requirement)
  4. Signature verification — provider verifies the SIWE signature using @signinwithethereum/siwe v4, supporting EOA, EIP-1271, and EIP-6492 signatures
  5. Token issuance — on success, the provider creates an account ID (eip155:{chainId}:{address}), resolves ENS data, and redirects back to the client with an authorization code

Supported OIDC Features