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

feat!: Normalize GoogleAuth<T> to AuthClient #1677

@danielbankhead

Description

@danielbankhead

We should normalize GoogleAuth<T extends AuthClient = JSONClient> to GoogleAuth<T extends AuthClient = AuthClient> (and GoogleAuthOptions as well).

Additionally, we should:

  • change clientOptions from:

    /**
    * Options object passed to the constructor of the client
    */
    clientOptions?:
    | JWTOptions
    | OAuth2ClientOptions
    | UserRefreshClientOptions
    | ImpersonatedOptions;

    to:

    /**
     * Options object passed to the constructor of the client
     */
    clientOptions?: ConstructorParameters<typeof T>[0];

    In both GoogleAuth and GoogleAuthOptions to accurately match the expected client options.

  • change cachedCredential from:

    cachedCredential: JSONClient | Impersonated | Compute | T | null = null;

    to:

    cachedCredential: T | null = null; 

    in order to normalize the expected AuthClient

Dependencies:

Implementation Notes:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Breaking Changenext major: breaking changethis is a change that we should wait to bundle into the next major versionpriority: p3Desirable enhancement or fix. May not be included in next release.semver: majorHint for users that this is an API breaking change.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