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> from JSONClient to AuthClient #1940

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

d-goog
Copy link
Collaborator

@d-goog d-goog commented Feb 21, 2025

Description

Improve a long-open pain-point for customers by setting the default AuthClient generic in GoogleAuth to AuthClient:

This improves the default compatibly between GoogleAuth instances as they would all be compatible by default (given AuthClient is the base type of all AuthClients)

Impact

A few things:

  • Improved ergonomics for sharing instances of GoogleAuth
  • Provides a type hints for clientOptions, making it easier for customers to see options for all auth clients:
    • Screenshot 2025-02-20 at 9 54 08 PM

Testing

This is mostly a TypeScript-level change; non-functional. However, I've added a simple test to ensure compatibility.

Additional Information

The clientOptions field could be improved by the following:

Fixes #1677

🦕

@d-goog d-goog requested review from a team as code owners February 21, 2025 05:56
@product-auto-label product-auto-label bot added size: s Pull request size is small. size: m Pull request size is medium. and removed size: s Pull request size is small. labels Feb 21, 2025
@d-goog d-goog changed the title feat!: Normalize to GoogleAuth<AuthClient> feat!: Normalize GoogleAuth<T> from JSONClient to AuthClient Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat!: Normalize GoogleAuth<T> to AuthClient
1 participant