an appview-less Bluesky client using Constellation and PDS Queries
reddwarf.app
frontend
spa
bluesky
reddwarf
microcosm
1import { BrowserOAuthClient, type ClientMetadata } from '@atproto/oauth-client-browser';
2
3import resolvers from '../../public/resolvers.json' with { type: 'json' };
4const handleResolverPDS = resolvers.resolver || 'https://bsky.social';
5
6// eslint-disable-next-line @typescript-eslint/ban-ts-comment
7// @ts-ignore this should be fine ? the vite plugin should generate this before errors
8import clientMetadata from '../../public/client-metadata.json' with { type: 'json' };
9
10export const oauthClient = new BrowserOAuthClient({
11 // The type assertion is needed because the static import isn't strictly typed
12 clientMetadata: clientMetadata as ClientMetadata,
13 handleResolver: handleResolverPDS,
14});