test: Improve auth tests with real OAuth flow validation

- Updated auth tests to use environment variables for credentials
- Tests now validate full OAuth redirect to Bluesky
- Added proper error checking for missing test credentials
- Updated .example.env with test credential placeholders
- All 3 auth tests passing (login page, error handling, OAuth redirect)
- OAuth successfully redirects to bsky.social/oauth (localhost limitation noted)

Note: Full E2E login requires public URL (ngrok) as Bluesky rejects localhost

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-08 21:19:49 +00:00
parent 14f3789a57
commit 82031c3499
2 changed files with 22 additions and 6 deletions

View File

@@ -18,5 +18,9 @@ DEEPGRAM_API_KEY=your-deepgram-api-key
BLUESKY_CLIENT_ID=http://localhost:3000/client-metadata.json
BLUESKY_REDIRECT_URI=http://localhost:3000/api/auth/callback
# Test Account Credentials (for E2E tests)
TEST_BLUESKY_HANDLE=your-test-bluesky-handle
TEST_BLUESKY_PASSWORD=your-test-bluesky-password
# Anthropic API Key (for Magnitude testing)
ANTHROPIC_API_KEY=your-anthropic-api-key