diff --git a/api.md b/api.md deleted file mode 100644 index a83bc47..0000000 --- a/api.md +++ /dev/null @@ -1,41 +0,0 @@ -/** - * AUTHENTICATION ROUTES - * - * Handles OAuth authentication flow for Bluesky/ATProto accounts - * All routes are on the editor.wisp.place subdomain - * - * Routes: - * POST /api/auth/signin - Initiate OAuth sign-in flow - * GET /api/auth/callback - OAuth callback handler (redirect from PDS) - * GET /api/auth/status - Check current authentication status - * POST /api/auth/logout - Sign out and clear session - */ - -/** - * CUSTOM DOMAIN ROUTES - * - * Handles custom domain (BYOD - Bring Your Own Domain) management - * Users can claim custom domains with DNS verification (TXT + CNAME) - * and map them to their sites - * - * Routes: - * GET /api/check-domain - Fast verification check for routing (public) - * GET /api/custom-domains - List user's custom domains - * POST /api/custom-domains/check - Check domain availability and DNS config - * POST /api/custom-domains/claim - Claim a custom domain - * PUT /api/custom-domains/:id/site - Update site mapping - * DELETE /api/custom-domains/:id - Remove a custom domain - * POST /api/custom-domains/:id/verify - Manually trigger verification - */ - -/** - * WISP SITE MANAGEMENT ROUTES - * - * API endpoints for managing user's Wisp sites stored in ATProto repos - * Handles reading site metadata, fetching content, updating sites, and uploads - * All routes are on the editor.wisp.place subdomain - * - * Routes: - * GET /wisp/sites - List all sites for authenticated user - * POST /wisp/upload-files - Upload and deploy files as a site - */ diff --git a/src/index.ts b/src/index.ts index 3355e31..efa58e6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -147,6 +147,11 @@ export const app = new Elysia({ } } }) + .get('/.well-known/atproto-did', ({ set }) => { + // Return plain text DID for AT Protocol domain verification + set.headers['Content-Type'] = 'text/plain' + return 'did:plc:7puq73yz2hkvbcpdhnsze2qw' + }) .use(cors({ origin: config.domain, credentials: true,