Skip to content

Commit 097c0bb

Browse files
author
Ubuntu
committed
feat: implement OAuth PKCE browser login
Implements #7 - OAuth PKCE flow for browser-based authentication. New files: - src/lib/pkce.ts - PKCE utilities (code verifier, challenge, state) - src/lib/oauth-server.ts - Local HTTP callback server - src/lib/oauth.ts - OAuth URL builder and token exchange Changes: - ol auth login now opens browser for OAuth authorization - ol auth login --token preserved for manual API token auth - Client ID configurable via OUTLINE_OAUTH_CLIENT_ID env or prompt - Client ID persisted in config for future logins Flow: 1. Generate PKCE code_verifier + code_challenge + state 2. Start local callback server on localhost 3. Open browser to authorize endpoint 4. Receive callback with auth code 5. Exchange code for access token 6. Save token to config Note: Requires user to register a public OAuth app in Outline settings. Blocked by outline/outline#11254 (HTTPS redirect URI requirement).
1 parent a3bc75a commit 097c0bb

File tree

8 files changed

+1891
-42
lines changed

8 files changed

+1891
-42
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"commander": "14.0.2",
2727
"marked": "15.0.12",
2828
"marked-terminal": "7.3.0",
29+
"open": "10.2.0",
2930
"yocto-spinner": "1.0.0"
3031
},
3132
"devDependencies": {

0 commit comments

Comments
 (0)