-
Notifications
You must be signed in to change notification settings - Fork 2k
get_access_token() doesn't work with cluster redis #3897
Copy link
Copy link
Closed
Labels
authRelated to authentication (Bearer, JWT, OAuth, WorkOS) for client or server.Related to authentication (Bearer, JWT, OAuth, WorkOS) for client or server.bugSomething isn't working. Reports of errors, unexpected behavior, or broken functionality.Something isn't working. Reports of errors, unexpected behavior, or broken functionality.serverRelated to FastMCP server implementation or server-side functionality.Related to FastMCP server implementation or server-side functionality.tasksRelated to background tasks, Docket, SEP-1686.Related to background tasks, Docket, SEP-1686.
Metadata
Metadata
Assignees
Labels
authRelated to authentication (Bearer, JWT, OAuth, WorkOS) for client or server.Related to authentication (Bearer, JWT, OAuth, WorkOS) for client or server.bugSomething isn't working. Reports of errors, unexpected behavior, or broken functionality.Something isn't working. Reports of errors, unexpected behavior, or broken functionality.serverRelated to FastMCP server implementation or server-side functionality.Related to FastMCP server implementation or server-side functionality.tasksRelated to background tasks, Docket, SEP-1686.Related to background tasks, Docket, SEP-1686.
What happened?
In https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L400, only non-cluster redis client is supported. Therefore, when
FASTMCP_DOCKET_URLpoints toredis+cluster://,get_access_tokenalways returnsNonewhen used in background task, and warning log is printedFailed to load task snapshot via sync RedisThe actual persisting of the token relies on
docket.rediswhich correctly handles cluster protocol - so data is stored correctly in https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/dependencies.py#L277Example Code
Version Information