Skip to content

fix(cli): exchange gateway token after agent auth#50

Merged
michiosw merged 1 commit intomainfrom
feat/gateway-connect-session-exchange
Apr 9, 2026
Merged

fix(cli): exchange gateway token after agent auth#50
michiosw merged 1 commit intomainfrom
feat/gateway-connect-session-exchange

Conversation

@michiosw
Copy link
Copy Markdown
Contributor

@michiosw michiosw commented Apr 9, 2026

Summary

  • exchange the fresh agent-scoped login token into the real gateway token before calling /mcp/connect-session
  • keep the existing one-shot agent auth fallback, but stop sending the raw OAuth access token to the hosted connect-session endpoint
  • update the fallback test to cover both token exchange hops

Testing

  • go test ./internal/run ./internal/auth
  • go test ./...
  • go vet ./...

Hosted verification

  • deployed backend revision api-00280-tvw is serving image gcr.io/spaces-479912/api:e65aeeb0622efe1aefbb263e89e96f2f8d00c1e3
  • live agent-scoped browser auth completed against app_8112a731-0d0f-4115-b46c-3cf55bfb73d0
  • live POST /mcp/connect-session returned 200 OK with a hosted connect URL after the extra gateway token exchange

Open with Devin

@michiosw michiosw merged commit 77608e2 into main Apr 9, 2026
3 of 4 checks passed
@michiosw michiosw deleted the feat/gateway-connect-session-exchange branch April 9, 2026 15:18
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant