Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

ServiceTokens are created on each Connection.request when the unexpired may still be available in the ServiceTokenProvider #56

Description

@leisurehound

Is your feature request related to a problem? Please describe.

The latency of repeated requests (at least to Sheets API) is non-trivial, as it appears on each request a new token is requested. This likely results in extra unnecessary bandwidth consumption for devices and delays in the user experience.

Describe the solution you'd like

If the current token is unexpired, it should be returned. Additionally, if a request comes in before an imminently expiring token an asynchronous process should be kicked off to refresh it. Alternatively, upon creation of a token schedule a refresh slightly before token expiry.

Describe alternatives you've considered

See above for two possible solutions.

Additional context

I will craft a PR for one of the alternatives shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions