diff --git a/src/lib/api/feed/custom.ts b/src/lib/api/feed/custom.ts index 497d700..63fcbac 100644 --- a/src/lib/api/feed/custom.ts +++ b/src/lib/api/feed/custom.ts @@ -53,29 +53,18 @@ export class CustomFeedAPI implements FeedAPI { limit: number }): Promise { // Microcosm batch path: Slingshot proxies the feed generator's skeleton and - // fetches all post records in one request. For personalized feeds we forward - // a service-auth token (aud = the feed generator's DID) so the generator can - // identify the viewer, exactly as the AppView would. + // fetches all post records in one request. We request the PUBLIC skeleton + // (no auth): Slingshot's batch proxy can't forward a service-auth token (it + // returns 400 for any `authorization` value), so we don't send one. Most + // feeds (Discover, what's-hot, etc.) have a usable public skeleton even for + // logged-in users. Truly personalized feeds return little/nothing here and + // fall through to the AppView below, which forwards the viewer's auth. if (MICROCOSM_ENABLED) { try { const page = await buildCustomFeed(this.params.feed, { viewerDid: this.agent.did, limit, cursor, - getAuthorization: this.agent.did - ? async (feedGenDid: string) => { - try { - const {data} = - await this.agent.com.atproto.server.getServiceAuth({ - aud: feedGenDid, - lxm: 'app.bsky.feed.getFeedSkeleton', - }) - return data.token - } catch { - return undefined - } - } - : undefined, }) if (page.feed.length) { return {cursor: page.cursor, feed: page.feed}