Hi Ory team—we’re building a remote MCP pilot with...
# ory-network
r
Hi Ory team—we’re building a remote MCP pilot with Claude using hosted Ory Network, opaque access tokens, zero refresh-token rotation grace, and an application-enforced 30-day connection limit. We’ve reviewed the documentation and consulted Ory’s AI assistant, but two questions need engineering clarification: 1. After a refresh token is consumed, how long does Ory Network retain the information needed to detect its reuse and revoke active descendants? Does that protection continue after internal cleanup, throughout our 30-day connection? Is retention configurable? 2. With zero grace, can two simultaneous refresh requests produce access tokens that both briefly authorize requests? In our synthetic hosted tests, two simultaneous refresh requests both returned HTTP 200. After both completed, only one returned access/refresh pair remained active. Replaying the original token revoked its active descendants. A separate replay test after 35 minutes also revoked the descendants, but we cannot determine whether internal cleanup had occurred. Could an engineer or maintainer clarify the hosted guarantees and any relevant settings or plan restrictions? We can provide redacted reproduction details privately if helpful. Thank you.
m
Hello @ripe-application-70179 Your results match what I see. I reproduced your setup on an Ory Network project with opaque access tokens and zero grace, and got the same outcome. quick answers: • a used refresh token stays detectable for at least several days after it was used, not for the whole 30-day connection, and you can't configure that period. • With zero grace, both simultaneous refreshes can return HTTP 200. The first access token works for about as long as one refresh takes, and it is already inactive by the time the second response arrives. some notes for your use case: • If the client keeps pair A, its next refresh presents a retired token. That triggers reuse detection, which revokes the chain including pair B, and the user has to reconnect. I confirmed this in testing. Clients should run only one refresh at a time per connection: https://www.ory.sh/docs/hydra/debug#refresh-token-flow-fails • When many requests compete, the second request can return 400 invalid_request instead of 200, with "Failed to refresh token because of multiple concurrent requests using the same token. Please retry the request." This didn't occur in my tests. • If your MCP server caches introspection responses, it keeps accepting A's access token until that cache entry expires. Let me know if anything here doesn't match what you see.
r
We'll revoke earlier grants on reconnect and keep introspection uncached. Appreciate the help!
h
Just wanted to let you know that resource identifiers are coming to Ory Network which enables much better integration with MCP servers! Release will happen likely next week.
r
Thank you, I look forward to it!