Feature/integrated auth and dashboard#42
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
madtank
left a comment
There was a problem hiding this comment.
Thanks for this PR - nice improvement for first-time user onboarding!
A couple of small fixes before we merge:
-
Type hint fix:
Dict[str, any]should beDict[str, Any](capital A) in:src/ax_agent_studio/auth/token_validator.py:74src/ax_agent_studio/auth/oauth_manager.py:33
You'll also need to add
Anyto the typing import. -
Redundant import: In
src/ax_agent_studio/dashboard/backend/main.py:647, there's an inlinefrom ax_agent_studio.auth import OAuthManagerbut it's already imported at the top of the file (line 21). Can remove the duplicate.
Once those are fixed, we'll merge it. 👍
|
Also, the CLA check is failing. You'll need to sign the Contributor License Agreement:
Let us know if you have any questions! |
|
I have read the CLA Document and I hereby sign the CLA |
🔐 Integrate OAuth Authentication into Dashboard Workflow
Overview
Streamlines agent setup by eliminating the confusing two-step authentication process. Users now authenticate directly through the dashboard UI instead of manually running npx mcp-remote.
What Changed
Before:
Step 1: Manual auth (confusing for beginners)
npx mcp-remote https://mcp.paxai.app/mcp/agents/twitter_agent --oauth-server https://api.paxai.app
Step 2: Start dashboard
python3 scripts/start_dashboard.py
After:
Single command - auth happens in UI
python3 scripts/start_dashboard.py
Key Features
✅ One-click authentication - Auth modal appears when needed
✅ Visual feedback - Real-time progress during OAuth flow
✅ Auto-retry - Monitor starts automatically after successful auth
✅ Version-agnostic - Finds tokens across all mcp-remote versions (0.1.29, 0.1.35, 0.1.36+)
✅ Universal - Works identically for all agents (twitter, message_draft, nano_banana_pro, etc.)
Technical Improvements
New TokenValidator class searches all mcp-remote directories
OAuthManager handles async OAuth flow with proper timeout/error handling
Fixed stdin JSON parsing errors in mcp-remote subprocess
Added pre-flight auth checks before starting monitors
Robust process cleanup prevents success/failure state corruption
Files Added/Modified
src/ax_agent_studio/auth/ - New authentication modules
src/ax_agent_studio/dashboard/backend/main.py - Auth status API endpoints
src/ax_agent_studio/dashboard/frontend/ - Auth modal and flow handling
Fixes the big user onboarding pain point and makes the setup process significantly more beginner-friendly.