Skip to content
Docs · OpenID Connect

OpenID Connect for Holochain

hApp Auth speaks OpenID Connect and OAuth 2.1 as they are written, so the library you already use works. What is particular to the Holochain web is in the scopes, the subjects and the assurance levels.

The issuer

The issuer is https://happauth.com. Everything else is published in its discovery document, served from the edge with a long cache that is purged when keys rotate.

Terminal
curl https://happauth.com/.well-known/openid-configuration

The protocol

AreahApp AuthWhy
GrantAuthorization code with PKCE S256, for every client. No implicit grant, no password grant.OAuth 2.1; RFC 9700
Authorization responseiss on every responseRFC 9207, mix-up defence
CodesSingle use; 10 minutes today, 60 seconds ComingShort and spent
Access tokensJWT (RFC 9068), 5 minutes, bound to one audience with resource indicators (RFC 8707)Any resource can verify one locally
Refresh tokensOpaque and rotating; reuse revokes the whole family
ID token signingRS256 always (discovery requires it); EdDSA and ES256 on request Coming
Pushed requestsPAR for every client that opts in, required for confidential clients ComingOrdinary OIDC and MCP libraries do not send PAR
Sender constraintDPoP whenever the client offers it; otherwise short single-resource Bearer tokens ComingMCP uses Bearer; DPoP is optional there
LogoutRevocation endpoint, short tokens, front-channel session end; back-channel only for pre-registered clients
Revocation noticeWhen a person revokes a site, the site is told with a signed Security Event Token (RFC 8417) ComingA site should not learn of it only when a refresh fails
FAPI 2.0Offered to confidential clients that ask; not applied to everyoneFAPI 2.0 forbids public clients and refresh rotation
FedCMNot nowChrome-only

Clients without registration

A client is identified by a client ID metadata document: the client id is an HTTPS URL that serves the client’s metadata. There is no registration form, no approval and no secret. First-party clients are pre-registered with private_key_jwt.

  • Redirect URIs sit on the client-id origin by default; localhost-only redirects are allowed and the person sees a warning line.
  • The document is fetched with a 5 KB cap, no redirects, no special-use IP ranges and a short timeout, and cached by HTTP semantics.
  • A logo you publish is fetched and cached by hApp Auth, never hot-linked into the consent screen.

The quickstart shows a complete document.

Subjects

First-party clients (hAppRadar, QuickhApp) receive a public subject. Every third-party site receives a pairwise subject, keyed on the client-id host: the same person has a different sub on every site, so two sites cannot join their records by it.

Assurance levels Coming

Every ID token will carry acr, so a site can ask more for what matters to it.

acrReached by
urn:happauth:loa:passkeyA passkey ceremony this session
urn:happauth:loa:githubGitHub sign-in this session
urn:happauth:loa:emailAn email code this session
urn:happauth:loa:agentAn agent-key signature: proves a running conductor, not a present person
Check it before anything that matters

Treat urn:happauth:loa:agent as convenience. Before an account-level action on your site, require a passkey session. hApp Auth holds itself to the same rule: its own account actions need a passkey within the last 15 minutes.

Scopes and claims

ScopeClaims
openidsub, auth_time; acr, amr Coming
profilename, picture
emailemail, email_verified
github Cominggithub: { id, login, created_at }
happ:agents ComingFor each network (DNA hash) the site names and the person ticks: the keys bound in that network and their pairwise id. Never the person’s full key list, which would undo pairwise subjects.
happ:maintainer Comingmaintainer: [slug, ...] from hAppRadar claim proofs
offline_accessA refresh token
quickhapp:read, quickhapp:writeNo claim. Resource scopes for QuickhApp’s agent server: request them with resource=https://quickhapp.com/mcp and the access token is bound to that server alone

Agents and CLIs

MCP clients Coming find hApp Auth through the protected-resource metadata (RFC 9728) that every resource publishes, ask the person on the same consent screen as any site (“Claude Code wants to publish to your QuickhApp site”), and hold a short-lived token the person sees and can revoke on their account page.

Command-line tools Coming use the device grant (RFC 8628); the approval screen names the client and its scopes.

The consent screen leads with your hostname, above any name or logo you supply, then one plain line per scope with a toggle on the optional ones, and one button. It is always white and never takes your colours, so it looks the same on every site and a person can tell the real one from a copy.

See the consent screen