@@ -15,6 +15,11 @@ AT Protocol universe (a DID, a handle, a data repository) automatically provisio
1515From your app's perspective, ePDS uses standard AT Protocol OAuth (PAR + PKCE + DPoP).
1616The reference implementation is ` packages/demo ` in the [ ePDS repository] ( https://github.com/hypercerts-org/ePDS ) .
1717
18+ For protocol-level detail beyond ePDS specifics — DPoP proof mechanics, granular
19+ scope design (` repo: ` /` rpc: ` /` blob: ` /` account: ` ), identity verification after token
20+ exchange, and refresh-token race handling — see the ` atproto-oauth ` skill. This skill
21+ covers only what is ePDS-specific.
22+
1823## Two Flows
1924
2025| Flow | App provides | How user starts | Implementation |
@@ -57,7 +62,7 @@ are mutually exclusive:
5762 "client_id" : " https://yourapp.example.com/client-metadata.json" ,
5863 "client_name" : " Your App" ,
5964 "redirect_uris" : [" https://yourapp.example.com/api/oauth/callback" ],
60- "scope" : " atproto transition:generic " ,
65+ "scope" : " atproto include:org.hypercerts.authWrite include:app.certified.authWrite " ,
6166 "grant_types" : [" authorization_code" , " refresh_token" ],
6267 "response_types" : [" code" ],
6368 "token_endpoint_auth_method" : " private_key_jwt" ,
@@ -67,6 +72,17 @@ are mutually exclusive:
6772}
6873```
6974
75+ > ** On the ` scope ` value:** ` atproto ` is mandatory and must be listed first; the
76+ > remaining entries request only the permissions your app needs. The examples here
77+ > reference two hypercerts specific permission sets via the ` include: ` prefix —
78+ > ` include:org.hypercerts.authWrite ` and ` include:app.certified.authWrite ` ;
79+ > substitute the permission sets your own app defines. A
80+ > permission set that bundles ` rpc: ` service calls also needs an
81+ > ` ?aud=<service-did> ` parameter (with ` # ` percent-encoded as ` %23 ` ); these are
82+ > write-only sets, so no ` aud ` is required. Avoid the legacy ` transition:generic `
83+ > catch-all. See the ` atproto-oauth ` skill's "Scopes and Permission Sets" for the
84+ > grammar.
85+
7086Alternatively, replace ` jwks_uri ` with an inline ` jwks ` object containing
7187the public key directly — see
7288[ client-metadata.md] ( references/client-metadata.md ) for both forms, the
@@ -85,7 +101,8 @@ const client = new NodeOAuthClient({
85101 client_id: ' https://yourapp.example.com/client-metadata.json' ,
86102 client_name: ' Your App' ,
87103 redirect_uris: [' https://yourapp.example.com/api/oauth/callback' ],
88- scope: ' atproto transition:generic' ,
104+ scope:
105+ ' atproto include:org.hypercerts.authWrite include:app.certified.authWrite' ,
89106 grant_types: [' authorization_code' , ' refresh_token' ],
90107 response_types: [' code' ],
91108 token_endpoint_auth_method: ' private_key_jwt' ,
0 commit comments