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.

chore: oops

Mary e30afd6d bac1b0f2

+1 -64
+1 -1
.changeset/eleven-rules-rhyme.md
··· 2 2 '@atcute/xrpc-server': patch 3 3 --- 4 4 5 - refactor(xrpc-server): clean up Valita schemas 5 + clean up Valita schemas
-63
packages/oauth/browser-client/CHANGELOG.md
··· 1 1 # @atcute/oauth-browser-client 2 2 3 - ## 2.0.0-next.0 4 - 5 - ### Major Changes 6 - 7 - - 82eb851: handle and DID document resolution are now externalized. 8 - 9 - although we've provided a "guide" on how to do your own handle resolution, the client itself still 10 - had to make its own resolution for post-authorization verification checks. this change finally 11 - makes it possible for you to supply a resolver for the client to use, and you're required to 12 - provide them. 13 - 14 - after upgrading, you would supply an `identityResolver` to `configureOAuth`. the helper 15 - `defaultIdentityResolver` composes handle and DID document resolvers if you still want the default 16 - behavior; using `@atcute/identity-resolver` implementations is recommended for this. 17 - 18 - ```ts 19 - import { configureOAuth, defaultIdentityResolver } from '@atcute/oauth-browser-client'; 20 - 21 - import { 22 - CompositeDidDocumentResolver, 23 - PlcDidDocumentResolver, 24 - WebDidDocumentResolver, 25 - XrpcHandleResolver, 26 - } from '@atcute/identity-resolver'; 27 - 28 - configureOAuth({ 29 - // ... existing config 30 - 31 - identityResolver: defaultIdentityResolver({ 32 - // AT Protocol handles resolve via DNS TXT record or HTTP well-known endpoints. 33 - // since web apps lack direct DNS access and face CORS restrictions, we're using 34 - // Bluesky's AppView for this example. 35 - // 36 - // NOTE: Bluesky may log handle resolutions and requester info per their privacy 37 - // policy. consider the privacy implications of this arrangement and change this 38 - // setup if unsuitable for your use case. 39 - handleResolver: new XrpcHandleResolver({ serviceUrl: 'https://public.api.bsky.app' }), 40 - 41 - didDocumentResolver: new CompositeDidDocumentResolver({ 42 - methods: { 43 - plc: new PlcDidDocumentResolver(), 44 - web: new WebDidDocumentResolver(), 45 - }, 46 - }), 47 - }), 48 - }); 49 - 50 - the resolved identity now includes both the did and a canonical handle (or `handle.invalid` if it 51 - can't be verified), which we use for `login_hint` to better match the reference OAuth client. 52 - ``` 53 - 54 - `resolveFromIdentity` and `resolveFromService` has been removed as a result. instead, pass the 55 - target directly to `createAuthorizationUrl`. 56 - 57 - ```ts 58 - const authUrl = await createAuthorizationUrl({ 59 - target: { type: 'account', identifier: 'mary.my.id' }, 60 - // or { type: 'pds', serviceUrl: 'https://bsky.social' } 61 - 62 - // ... existing options 63 - }); 64 - ``` 65 - 66 3 ## 1.0.27 67 4 68 5 ### Patch Changes