a collection of lightweight TypeScript packages for AT Protocol, the protocol powering Bluesky
atproto bluesky typescript npm
101
fork

Configure Feed

Select the types of activity you want to include in your feed.

bug(oauth-browser-client): request client assertion during PAR request

Mary 7d3da577 947afc7c

+11 -3
+5
.changeset/plenty-facts-invent.md
··· 1 + --- 2 + '@atcute/oauth-browser-client': patch 3 + --- 4 + 5 + request client assertion during PAR request
+6 -3
packages/oauth/browser-client/lib/agents/server-agent.ts
··· 35 35 throw new Error(`no endpoint for ${endpoint}`); 36 36 } 37 37 38 - if (endpoint === 'token' && fetchClientAssertion !== undefined) { 38 + if ( 39 + (endpoint === 'token' || endpoint === 'pushed_authorization_request') && 40 + fetchClientAssertion !== undefined 41 + ) { 39 42 const jkt = this.#dpopKey.jkt; 40 43 if (jkt === undefined) { 41 44 throw new Error(`DPoP key missing jkt field`); 42 45 } 43 46 44 - const clientAssertionCredentials = await fetchClientAssertion({ 47 + const assertion = await fetchClientAssertion({ 45 48 jkt: jkt, 46 49 aud: this.#metadata.issuer, 47 50 createDpopProof: async (url) => { ··· 50 53 }, 51 54 }); 52 55 53 - payload = { ...payload, ...clientAssertionCredentials }; 56 + payload = { ...payload, ...assertion }; 54 57 } 55 58 56 59 const response = await this.#fetch(url, {