[task] Sign members in to MCP and manage sessions
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 18/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- api, authentication, backend
Research direction
Start by reading the blocking issues #437 (SDK choice), #438 (directory client) and #439 (shared start/confirm logic), since this work cannot begin until all three land. Then check whether the chosen Python MCP SDK exposes OAuth authorization-server routes behind a provider interface; if so implement the provider, otherwise record why the routes are hand-built. Existing email-code flow lives in the /v1/auth/* handlers from #331 and prior art is PR #125. Done means the listed tests around /authorize, /token, /revoke and the admin revoke command pass.
Written by the indexing model from the issue text.
Description
Blocked by
#437
What
Give allowlisted coding agents browser OAuth sign-in using the gateway’s email-code login and a durable, revocable session.
Why
Members need to sign in as themselves and keep the agent connected across access-token expiry.
Area
integration, service
Done looks like
- Extract shared email-login start and confirm functions for the browser and the existing gateway routes. Preserve authenticated caller identity, challenge binding, delivery timing, limits and the existing public login contract.
- Add migration 003 with a working downgrade and matching in-memory and Postgres adapters. Bind each session to the member, client and environment. Store only hashes of authorization codes and tokens.
- Exchange each short-lived code once. Rotate refresh tokens, handle concurrent refresh within the agreed grace policy, and revoke on reuse outside it. Support single-session and all-session revocation.
- Discovery documents (
/.well-known/oauth-protected-resource/mcpand/.well-known/oauth-authorization-server) and/authorizeare served only when both the MCP switch andemail_login_enabledare on./authorizeaccepts onlyS256PKCE, this gateway's/mcpasresource, a client ID on the allowlist, and a loopback redirect address listed in that client's metadata document. - The login page signs the member in through #331's shared start and confirm logic under the app name
mcp, with their real IP and the same "check your email" message for members and non-members. It sendsno-store, a content security policy and framing protection, rejects cross-site form posts, and escapes everything it shows back. -
/tokenexchanges the code and PKCE verifier for tokens and rotates refresh tokens, checking membership on each refresh./revokeends the session. Tokens are bound to/mcpand the environment. - A
gateway-keys-style CLI command revokes all of a person's sessions. - Sign-in, refresh, logout, revocation and failed sign-in attempts are written to the audit log, with no tokens, codes or email addresses.
- Tests cover the whole sign-in from
/authorize, against fake directory and verification clients: success, non-member, wrong or expired code, wrong PKCE verifier, unknown client, bad redirect address, refresh, refresh after membership ends, revoke, and the admin command.
Design notes
Part of #436. Storage and the email-login refactor can begin alongside #437. Mounted OAuth routes depend on its SDK and feature switch. #442 owns authorization on tool requests. Detailed storage and email-login contracts: #438 and #439. Approved design: #335 / PR #399.
- Dominant language
- Python
- Stars
- 0
- Forks
- 2
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 31
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from UTMIST/Misty
-
area/tooling automation/health
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Epic: Protect live meeting Q&A and deliver recording outputs to the intended audiencePossibly taken @kr1shap claimed this 1 day ago. Openarea/bot area/docs-system area/integration area/service epic on hold
UTMIST/Misty#489 · 1 assignee ·
Maintainers usually reply within 1 day
-
area/bot on hold type/bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
area/bot on hold type/bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
Use a verified ingress boundary for gateway client IPsPossibly taken @qiuethan claimed this 2 days ago. Openarea/deployment area/observability area/service type/bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
[Doc]: Feedback for `/zh-cn/v0.30.0/tutorials/models/Qwen3.6-35B-A3B.html`A3社区配置和基线不一致,社区配置也达不到基线Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
vllm-project/vllm-ascend#24429 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
simnJS/AnyPS5#735 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
nq-rdl/agent-extensions#623 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
vortex-data/vortex#12633 ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gke-labs/kube-agents#7955 ·
Maintainers usually reply within 1 day