๐ OAuth 2.0 Debug Dashboard
โ ๏ธ OAuth 2.0 Requirements Checklist
- โ
CLIENT_ID and CLIENT_SECRET set in Wrangler secrets
- โ ๏ธ X.com app must have OAuth 2.0 enabled
- โ ๏ธ Callback URL must be:
https://x-oauth-worker.b-9f2.workers.dev/auth/oauth2/callback
- โ ๏ธ App permissions must include: tweet.read, tweet.write, users.read
๐ Configure your app:
X Developer Portal
๐ ๏ธ OAuth 2.0 Configuration
Authorization URL: https://twitter.com/i/oauth2/authorize
Token URL: https://api.twitter.com/2/oauth2/token
Redirect URI:
Grant Type: authorization_code
PKCE Method: plain
๐ Test Endpoints
OAuth 2.0 Request: /auth/oauth2/request
OAuth 2.0 Callback: /auth/oauth2/callback
Session Check: /auth/session/{id}
API Status: /health
๐ OAuth 2.0 Flow
1
Generate Authorization URL
Creates OAuth 2.0 authorization URL with PKCE challenge
2
User Authorization
User clicks authorize and is redirected to X.com
3
Handle Callback & Token Exchange
Exchange authorization code for access token
4
User Profile & Session
Retrieve user profile and create session
๐งช Diagnostic Tests
๐ง Worker Health
๐ Secrets Check
๐ Live Logs
Starting OAuth 2.0 debug session...