The 1st decentralized social network for sharing when you're on the toilet. Post a "flush" today! Powered by the AT Protocol.

update oauth path so only domain is shown

authored by xan.lol and committed by tangled.org abbaf9cf a708e246

+8 -8
+1 -1
README.md
··· 53 53 For production deployment: 54 54 55 55 1. Update the OAuth redirect URLs in both code and the Bluesky developer settings 56 - 2. Make sure the client metadata file is accessible at `https://flushing.im/client-metadata.json` 56 + 2. Make sure the client metadata file is accessible at `https://flushing.im/oauth-client-metadata.json` 57 57 3. Deploy the application to Vercel 58 58 59 59 ## Custom Lexicon Schema
+1 -1
public/client-metadata.json public/oauth-client-metadata.json
··· 1 1 { 2 - "client_id": "https://flushes.app/client-metadata.json", 2 + "client_id": "https://flushes.app/oauth-client-metadata.json", 3 3 "application_type": "web", 4 4 "client_name": "Flushes", 5 5 "client_uri": "https://flushes.app",
+1 -1
src/app/api/auth/token/route.ts
··· 5 5 6 6 const DEFAULT_AUTH_SERVER = 'https://public.api.bsky.app'; 7 7 const REDIRECT_URI = 'https://flushes.app/auth/callback'; 8 - const CLIENT_ID = 'https://flushes.app/client-metadata.json'; 8 + const CLIENT_ID = 'https://flushes.app/oauth-client-metadata.json'; 9 9 10 10 // Function to get a nonce from the specified PDS 11 11 async function getNonce(pdsEndpoint: string): Promise<string | null> {
+3 -3
src/lib/bluesky-api.ts
··· 111 111 body: new URLSearchParams({ 112 112 'grant_type': 'refresh_token', 113 113 'refresh_token': refreshToken, 114 - 'client_id': 'https://flushes.app/client-metadata.json' 114 + 'client_id': 'https://flushes.app/oauth-client-metadata.json' 115 115 }) 116 116 }); 117 117 ··· 215 215 body: new URLSearchParams({ 216 216 'grant_type': 'refresh_token', 217 217 'refresh_token': refreshToken, 218 - 'client_id': 'https://flushes.app/client-metadata.json' 218 + 'client_id': 'https://flushes.app/oauth-client-metadata.json' 219 219 }) 220 220 }); 221 221 ··· 276 276 body: new URLSearchParams({ 277 277 'grant_type': 'refresh_token', 278 278 'refresh_token': refreshToken, 279 - 'client_id': 'https://flushes.app/client-metadata.json' 279 + 'client_id': 'https://flushes.app/oauth-client-metadata.json' 280 280 }) 281 281 }); 282 282
+1 -1
src/lib/bluesky-auth.ts
··· 1 1 // Default Bluesky OAuth client configuration 2 2 const DEFAULT_AUTH_SERVER = 'https://public.api.bsky.app'; 3 3 const REDIRECT_URI = 'https://flushes.app/auth/callback'; 4 - const CLIENT_ID = 'https://flushes.app/client-metadata.json'; 4 + const CLIENT_ID = 'https://flushes.app/oauth-client-metadata.json'; 5 5 // Need to include transition:generic to be able to create records 6 6 const SCOPES = 'atproto transition:generic'; 7 7
+1 -1
src/lib/oauth-client.ts
··· 2 2 3 3 // Client metadata for the OAuth client 4 4 const CLIENT_METADATA = { 5 - "client_id": "https://flushes.app/client-metadata.json", 5 + "client_id": "https://flushes.app/oauth-client-metadata.json", 6 6 "application_type": "web" as const, 7 7 "client_name": "Flushes", 8 8 "client_uri": "https://flushes.app",