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.

refactor(oauth-browser-client): sort jwt keys

Mary 0b11d773 691f5cc1

+4 -9
+4 -9
packages/oauth/browser-client/lib/dpop.ts
··· 27 27 const headerString = dpopKey.jwt; 28 28 const keyPromise = crypto.subtle.importKey('pkcs8', fromBase64Url(dpopKey.key), ES256_ALG, true, ['sign']); 29 29 30 - const constructPayload = ( 31 - method: string, 32 - htu: string, 33 - nonce: string | undefined, 34 - ath: string | undefined, 35 - ) => { 30 + const constructPayload = (htm: string, htu: string, nonce: string | undefined, ath: string | undefined) => { 36 31 const payload = { 32 + ath: ath, 33 + htm: htm, 34 + htu: htu, 37 35 iat: Math.floor(Date.now() / 1_000), 38 36 jti: nanoid(24), 39 - htm: method, 40 - htu: htu, 41 37 nonce: nonce, 42 - ath: ath, 43 38 }; 44 39 45 40 return toBase64Url(encodeUtf8(JSON.stringify(payload)));