Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
danielbankhead opened this issue Oct 13, 2023 · 0 comments
Open

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

danielbankhead opened this issue Oct 13, 2023 · 0 comments
Labels
Breaking Change next major: breaking change this is a change that we should wait to bundle into the next major version priority: p3 Desirable enhancement or fix. May not be included in next release. semver: major Hint for users that this is an API breaking change. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@danielbankhead
Copy link
Member

danielbankhead commented Oct 13, 2023

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:

@danielbankhead danielbankhead added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. semver: major Hint for users that this is an API breaking change. Breaking Change priority: p3 Desirable enhancement or fix. May not be included in next release. next major: breaking change this is a change that we should wait to bundle into the next major version labels Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change next major: breaking change this is a change that we should wait to bundle into the next major version priority: p3 Desirable enhancement or fix. May not be included in next release. semver: major Hint for users that this is an API breaking change. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

1 participant