Skip to content

Stop capping WorkOS access token age at 24 hours - #2009

Merged
RhysSullivan merged 1 commit into
mainfrom
fix-mcp-token-max-age
Sep 15, 2026
Merged

RhysSullivan merged 1 commit into
mainfrom
fix-mcp-token-max-age

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

#2000 added `maxTokenAge: "24h"` to every WorkOS JWT verification. jose rejects a token whose `iat` is older than that cap even when `exp` is still in the future, and maps it to `JWTExpired`. AuthKit issues MCP access tokens that live for 7 days, so any MCP client with a token older than a day now gets `invalid_token: The access token expired` at `/owner/mcp`. Reported by Coder this morning.

This removes the age cap and keeps the `exp`/`iat` required-claims hardening. Adds a test that a 5-day-old, unexpired token verifies.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@RhysSullivan
RhysSullivan marked this pull request as ready for review September 15, 2026 16:19
@RhysSullivan
RhysSullivan merged commit 6bbb2bb into main Sep 15, 2026
40 of 42 checks passed
@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

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