primal
bce9369cb8
Fix OAuth session storage - add missing database columns
...
- Add dpop_authserver_nonce, dpop_pds_nonce, pds_url, authserver_iss columns
- These columns are required by GetSession query but were missing from schema
- Add migrations to create columns on existing tables
- Add debug logging for OAuth flow troubleshooting
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-02 00:44:19 -05:00
primal
cbf16bfbc8
v42: Revert to persistent session cookie (24h)
2026-01-30 16:13:24 -05:00
primal
aef0826004
v41: Session cookie for browser-close logout
2026-01-30 16:12:33 -05:00
primal
e0602b0123
v40: Persist OAuth sessions to database
2026-01-30 16:09:46 -05:00
primal
31b7b61bb0
v39: Fix session cookie Secure flag for HTTP
2026-01-30 16:05:59 -05:00
primal
8192bce301
Add AT Protocol OAuth 2.0 authentication for dashboard
...
- Implement full OAuth 2.0 with PKCE using haileyok/atproto-oauth-golang
- Backend For Frontend (BFF) pattern: tokens stored server-side only
- AES-256-GCM encrypted session cookies
- Auto token refresh when near expiry
- Restrict access to allowed handles (1440.news, wehrv.bsky.social)
- Add genkey utility for generating OAuth configuration
- Generic error messages to prevent handle enumeration
- Server-side logging of failed login attempts for security monitoring
New files:
- oauth.go: OAuth client wrapper and DID/handle resolution
- oauth_session.go: Session management with encrypted cookies
- oauth_middleware.go: RequireAuth middleware for route protection
- oauth_handlers.go: Login, callback, logout, metadata endpoints
- cmd/genkey/main.go: Generate OAuth secrets and JWK keypair
- oauth.env.example: Configuration template
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-30 15:16:51 -05:00