You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bearer auth accepts tokens with no expiry, and a test pins that acceptance — typescript-sdk rejects the same case; which behaviour does the spec intend? #3955
Hi — a cross-SDK consistency observation from a survey of deprecation/expiry-related test coverage. This is a question about intended behaviour, not a vulnerability report: I have not established what the specification requires here.
In this SDK, the server-side bearer auth middleware passes tokens whose expires_at is None, and the test test_token_without_expiry pins that acceptance as the expected behaviour.
In the sibling typescript-sdk, both generations explicitly reject tokens with no expiration time ("Token has no expiration time") and have tests for the rejection.
So under the same conditions, the two SDKs have opposite expectations fixed in their test suites. One of them presumably diverges from the intended reading of the spec — or the difference is deliberate (for example, expiry enforcement being the resource server's / provider's responsibility in one design).
Could you clarify which behaviour is intended? If rejection is intended, the fix on this side would be small and I can help with the test updates; if acceptance is intended, it may be worth aligning the typescript-sdk side or documenting the asymmetry.
I would like to take this on, starting with the behaviour question. The core issue is the divergence: this SDK accepts a bearer token with no exp and a test pins that acceptance, while the typescript-sdk rejects the same token, so the two SDKs disagree on the same credential. My plan is to reproduce the case in both SDKs first, then apply whichever direction you confirm as intended, either rejecting expiry-less tokens here and updating the pinning test, or documenting the asymmetry. Could you confirm which behaviour the spec intends and assign the issue to me? I will not open a PR until that is settled.
Activity
techaurah commentedon Dec 1, 2026
I would like to take this on, starting with the behaviour question. The core issue is the divergence: this SDK accepts a bearer token with no exp and a test pins that acceptance, while the typescript-sdk rejects the same token, so the two SDKs disagree on the same credential. My plan is to reproduce the case in both SDKs first, then apply whichever direction you confirm as intended, either rejecting expiry-less tokens here and updating the pinning test, or documenting the asymmetry. Could you confirm which behaviour the spec intends and assign the issue to me? I will not open a PR until that is settled.