Framework-agnostic OAuth integration for AT Protocol (Bluesky) applications.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Accept authorization server URLs in login handler

The /login endpoint now accepts https:// URLs (e.g. https://bsky.social)
in addition to AT Protocol handles, enabling "Connect with Bluesky"
flows that skip handle entry.

+14 -3
+9
CHANGELOG.md
··· 2 2 3 3 All notable changes to this project will be documented in this file. 4 4 5 + ## [2.6.0] - 2026-02-15 6 + 7 + ### Added 8 + 9 + - **Authorization server URL support**: The `/login` handler now accepts 10 + authorization server URLs (e.g., `https://bsky.social`) in addition to AT 11 + Protocol handles. This enables "Connect with Bluesky" flows that skip handle 12 + entry and redirect directly to a specific auth server. 13 + 5 14 ## [2.5.1] - 2025-01-09 6 15 7 16 ### Fixed
+1 -1
deno.json
··· 1 1 { 2 2 "$schema": "https://jsr.io/schema/config-file.v1.json", 3 3 "name": "@tijs/atproto-oauth", 4 - "version": "2.5.1", 4 + "version": "2.6.0", 5 5 "license": "MIT", 6 6 "exports": "./mod.ts", 7 7 "publish": {
+4 -2
src/routes.ts
··· 60 60 * Handle /login route - start OAuth flow 61 61 * 62 62 * Query parameters: 63 - * - handle: User's AT Protocol handle (required) 63 + * - handle: User's AT Protocol handle or authorization server URL (required) 64 64 * - redirect: Relative path to redirect after OAuth (optional) 65 65 * - mobile: Set to "true" for mobile OAuth flow (redirects to mobileScheme) 66 66 * - pwa: Set to "true" for PWA OAuth flow (returns HTML with postMessage) ··· 76 76 return new Response("Invalid handle", { status: 400 }); 77 77 } 78 78 79 - if (!isValidHandle(handle)) { 79 + // Accept AT Protocol handles and authorization server URLs (https://) 80 + const isUrl = handle.startsWith("https://"); 81 + if (!isUrl && !isValidHandle(handle)) { 80 82 return new Response("Invalid handle format", { status: 400 }); 81 83 } 82 84