MasterJ93/ATProtoKit#43 closes when this package ships its client, tests, and README. I'd be up for taking that on if you're open to it, following @atproto/oauth-client@0.7.x the way OAuthTypes follows @atproto/oauth-types.
Proposed sequence, one PR per phase:
- Complete OAuthTypes: port the missing atproto modules (
atproto-oauth-scope, atproto-loopback-client-id, atproto-loopback-client-redirect-uris, atproto-oauth-token-response, oauth-introspection-response), add Sendable conformance for strict-concurrency consumers, restore the client_id requirement on AuthorizationRequestQuery (the TS schema is an intersection), and harden the canonical-form check against percent-encoded dot segments, with conversion docs and tests.
- Client foundation: the store and cache layer (
SimpleStore, a single-flight CachedGetter actor), the runtime seam (key generation, SHA-256, secure random, named locks), Key/Keyset over Jot and JWTKit, DPoP proof minting, PKCE, RFC 7638 thumbprints.
- Resolvers: DID, handle, and identity resolution with bidirectional verification, plus the authorization-server and protected-resource metadata resolvers.
- Client core:
OAuthServerAgent, SessionGetter (refresh with single-use refresh-token race handling), OAuthSession (DPoP-bound fetch with nonce retry), OAuthClient, and client-metadata validation.
- Docs: README, DocC, and a
SessionConfiguration bridge example for ATProtoKit.
The port would target current spec behavior where it has drifted since the TS snapshot: htu stripped of query and fragment, no iss claim in resource-server DPoP proofs, form-encoded PAR with dpop_jkt, an exp claim in client assertions, and the June 2025 session-lifetime changes. Granular scopes stay out until they stabilize; transition scopes only.
Does this direction work, or would you shape the phases differently? Related: #1 fixes the existing OAuthTypes validators ahead of any of this.
MasterJ93/ATProtoKit#43 closes when this package ships its client, tests, and README. I'd be up for taking that on if you're open to it, following
@atproto/oauth-client@0.7.xthe way OAuthTypes follows@atproto/oauth-types.Proposed sequence, one PR per phase:
atproto-oauth-scope,atproto-loopback-client-id,atproto-loopback-client-redirect-uris,atproto-oauth-token-response,oauth-introspection-response), addSendableconformance for strict-concurrency consumers, restore theclient_idrequirement onAuthorizationRequestQuery(the TS schema is an intersection), and harden the canonical-form check against percent-encoded dot segments, with conversion docs and tests.SimpleStore, a single-flightCachedGetteractor), the runtime seam (key generation, SHA-256, secure random, named locks),Key/Keysetover Jot and JWTKit, DPoP proof minting, PKCE, RFC 7638 thumbprints.OAuthServerAgent,SessionGetter(refresh with single-use refresh-token race handling),OAuthSession(DPoP-bound fetch with nonce retry),OAuthClient, and client-metadata validation.SessionConfigurationbridge example for ATProtoKit.The port would target current spec behavior where it has drifted since the TS snapshot:
htustripped of query and fragment, noissclaim in resource-server DPoP proofs, form-encoded PAR withdpop_jkt, anexpclaim in client assertions, and the June 2025 session-lifetime changes. Granular scopes stay out until they stabilize; transition scopes only.Does this direction work, or would you shape the phases differently? Related: #1 fixes the existing OAuthTypes validators ahead of any of this.