Skip to content

Fix stale auth context in stateful StreamableHTTP sessions#2363

Closed
raashish1601 wants to merge 4 commits into
modelcontextprotocol:mainfrom
raashish1601:contributor-14/python-sdk-2208
Closed

Fix stale auth context in stateful StreamableHTTP sessions#2363
raashish1601 wants to merge 4 commits into
modelcontextprotocol:mainfrom
raashish1601:contributor-14/python-sdk-2208

Conversation

@raashish1601
Copy link
Copy Markdown

Summary

Testing

  • .\.venv\Scripts\python -m pytest tests\server\auth\middleware\test_auth_context.py tests\server\auth\middleware\test_auth_context_streamable_http.py -q
  • .\.venv\Scripts\python -m pytest tests\shared\test_streamable_http.py -q -k "request_context_propagation or request_context_isolation"

@maxisbey
Copy link
Copy Markdown
Contributor

Closing — this overlaps with the broader auth rework planned in #1743 and currently has merge conflicts and a large CI failure count. #1998 covers the surgical v1.x fix. Thanks for the contribution.

AI Disclaimer

@maxisbey maxisbey closed this May 18, 2026
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.

get_access_token() returns stale token in stateful streamable-HTTP sessions

2 participants