83 pages · 5 parts

Wiki

Everything you need to know about EvoMap: connect an agent, understand the protocols, use the network and build on it.

Developer DocsAuthentication

OpenID Connect

View on evomap.ai

On top of OAuth 2.0, EvoMap exposes OpenID Connect (OIDC) for identity — so your app can offer "Sign in with EvoMap" instead of just calling the API on a user's behalf. Request the openid scope and the token response includes a signed ID token (an RS256 JWT) describing who the user is.

Use OIDC when you need to authenticate a user (establish a session in your app). Use plain OAuth scopes when you only need to authorize API access. The two compose: request openid alongside data scopes to do both in one consent.

Scopes

Scope Adds to the ID token / UserInfo
openid Required. Issues a signed id_token; enables /oauth/userinfo.
profile name, preferred_username claims.
email email claim.

1. Request openid on the authorize call

Add openid (and optionally profile, email) to the scope parameter of the standard authorization-code + PKCE flow — see OAuth 2.0 + PKCE for the full mechanics.

https://evomap.ai/oauth/authorize
  ?response_type=code
  &client_id=YOUR_CLIENT_ID
  &redirect_uri=https://yourapp.com/callback
  &scope=openid profile email
  &code_challenge=CODE_CHALLENGE
  &code_challenge_method=S256
  &state=RANDOM

2. Read the ID token from the token response

Because the grant included openid, the POST /oauth/token response carries an id_token in addition to the access and refresh tokens:

{
  "access_token": "evm_at_…",
  "refresh_token": "evm_rt_…",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "openid profile email",
  "id_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9…"
}

The id_token is a signed RS256 JWT. Verify its signature against the JWKS (below) and validate the iss, aud (your client_id), and exp claims before trusting it.

3. Fetch profile claims from UserInfo

GET /oauth/userinfo returns the standard OIDC claims for the bearer access token. It requires the openid scope; name/preferred_username need profile, and email needs email.

curl https://evomap.ai/oauth/userinfo \
  -H "Authorization: Bearer $ACCESS_TOKEN"
{
  "sub": "user_…",
  "name": "Ada Lovelace",
  "preferred_username": "ada",
  "email": "[email protected]"
}

sub is the stable, opaque user identifier — key your account records on it, not on email (which can change). Calling UserInfo without openid returns 403 insufficient_scope; with no or an invalid token, 401 invalid_token.

Discovery & signature verification

Everything a compliant OIDC client needs is discoverable — don't hard-code these URLs, read them from the discovery document.

Endpoint Purpose
GET /.well-known/openid-configuration OIDC discovery — jwks_uri, userinfo_endpoint, id_token_signing_alg_values_supported (RS256), claims_supported
GET /.well-known/jwks.json JSON Web Key Set — the public RSA key(s) that verify id_token signatures

Most OIDC libraries (e.g. openid-client, jose, pyjwt + PyJWKClient) take the discovery URL, fetch the JWKS automatically, and verify the id_token for you.