a a vibe-coded abomination experiment of a fragrance review platform built on the atmosphere. drydown.social

fixing url for oauth

+22 -14
+8 -6
public/client-metadata.json
··· 1 1 { 2 - "client_id": "http://localhost:5173/client-metadata.json", 2 + "client_id": "https://drydown.pages.dev/client-metadata.json", 3 3 "client_name": "Drydown App", 4 - "client_uri": "http://localhost:5173", 5 - "logo_uri": "http://localhost:5173/vite.svg", 6 - "tos_uri": "http://localhost:5173/tos", 7 - "policy_uri": "http://localhost:5173/policy", 4 + "client_uri": "https://drydown.pages.dev", 5 + "logo_uri": "https://drydown.pages.dev/vite.svg", 6 + "tos_uri": "https://drydown.pages.dev/tos", 7 + "policy_uri": "https://drydown.pages.dev/policy", 8 8 "redirect_uris": [ 9 - "http://127.0.0.1:5173" 9 + "http://127.0.0.1:5173", 10 + "https://drydown.pages.dev/", 11 + "https://drydown.social/" 10 12 ], 11 13 "scope": "atproto transition:generic", 12 14 "grant_types": [
+4 -2
src/app.tsx
··· 33 33 } catch (err) { 34 34 console.error('Auth init failed:', err) 35 35 // If it's a ZodError about localhost, checking the URL might help 36 - if (window.location.hostname !== '127.0.0.1') { 37 - alert('Configuration Error: Please access this app via http://127.0.0.1:5173. The OAuth client requires this exact usage.') 36 + // If it's a ZodError about localhost, checking the URL might help 37 + const allowedHosts = ['127.0.0.1', 'drydown.pages.dev', 'drydown.social'] 38 + if (!allowedHosts.includes(window.location.hostname)) { 39 + alert(`Configuration Error: Please access this app via one of the allowed domains: ${allowedHosts.join(', ')}.`) 38 40 } 39 41 } finally { 40 42 setIsInitializing(false)
+10 -6
src/auth.ts
··· 2 2 3 3 // The metadata must match what is served at the client_id URL 4 4 const clientMetadata: OAuthClientMetadataInput = { 5 - client_id: 'http://localhost?redirect_uri=http%3A%2F%2F127.0.0.1%3A5173&scope=atproto%20transition%3Ageneric', 5 + client_id: 'https://drydown.pages.dev/client-metadata.json', 6 6 client_name: 'Drydown App', 7 - client_uri: 'http://localhost:5173', 8 - logo_uri: 'http://localhost:5173/vite.svg', 9 - tos_uri: 'http://localhost:5173/tos', 10 - policy_uri: 'http://localhost:5173/policy', 11 - redirect_uris: ['http://127.0.0.1:5173'], 7 + client_uri: 'https://drydown.pages.dev', 8 + logo_uri: 'https://drydown.pages.dev/vite.svg', 9 + tos_uri: 'https://drydown.pages.dev/tos', 10 + policy_uri: 'https://drydown.pages.dev/policy', 11 + redirect_uris: [ 12 + 'http://127.0.0.1:5173', 13 + 'https://drydown.pages.dev/', 14 + 'https://drydown.social/', 15 + ], 12 16 scope: 'atproto transition:generic', 13 17 grant_types: ['authorization_code', 'refresh_token'], 14 18 response_types: ['code'],