···22const nextConfig = {
33 reactStrictMode: true,
44 images: {
55- domains: ['bsky.social', 'cdn.bsky.app'],
55+ domains: ['public.api.bsky.app', 'cdn.bsky.app'],
66 },
77 // We need to specify which pages need to be dynamic
88 // to prevent build errors with pages that use client-side features
+2-2
app/scripts/firehose-worker.js
···196196async function resolveDIDWithBskyAPI(did) {
197197 return new Promise((resolve, reject) => {
198198 // The Bluesky API endpoint for DID-to-handle resolution
199199- const url = `https://api.bsky.app/xrpc/com.atproto.repo.describeRepo?repo=${encodeURIComponent(did)}`;
199199+ const url = `https://public.api.bsky.app/xrpc/com.atproto.repo.describeRepo?repo=${encodeURIComponent(did)}`;
200200 console.log(`Making Bluesky API request to: ${url}`);
201201202202 const options = getRequestOptions(url);
···259259 }
260260261261 return new Promise((resolve, reject) => {
262262- const url = `https://api.bsky.app/xrpc/com.atproto.identity.resolveHandle?handle=${encodeURIComponent(did)}`;
262262+ const url = `https://public.api.bsky.app/xrpc/com.atproto.identity.resolveHandle?handle=${encodeURIComponent(did)}`;
263263 console.log(`Making handle resolver request to: ${url}`);
264264265265 const options = getRequestOptions(url);
+1-1
app/src/app/api/auth/token/route.ts
···42424343 // CRITICAL FIX: Use the correct token endpoint based on PDS type
4444 // - For bsky.network PDSes: always use public.api.bsky.app for token exchange
4545- // - For bsky.social: use it directly
4545+ // - For public.api.bsky.app: use it directly
4646 // - For third-party PDSes: use their own endpoint
4747 let authServer = pdsEndpoint;
4848
+2-2
app/src/lib/bluesky-auth.ts
···4040 }
41414242 // If not a DID, resolve the handle to a DID
4343- const resolveResponse = await fetch(`https://api.bsky.app/xrpc/com.atproto.identity.resolveHandle?handle=${encodeURIComponent(handle)}`);
4343+ const resolveResponse = await fetch(`https://public.api.bsky.app/xrpc/com.atproto.identity.resolveHandle?handle=${encodeURIComponent(handle)}`);
44444545 if (!resolveResponse.ok) {
4646 throw new Error(`Failed to resolve handle: ${resolveResponse.status}`);
···432432 code,
433433 codeVerifier,
434434 dpopToken,
435435- pdsEndpoint, // Auth server endpoint (usually bsky.social)
435435+ pdsEndpoint, // Auth server endpoint (usually public.api.bsky.app)
436436 originalPdsEndpoint // The original PDS endpoint (for third-party PDS)
437437 })
438438 });