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

[googleapis_auth] Add support for non-Google OAuth providers #597

Merged
merged 27 commits into from
Feb 27, 2024

Conversation

bryanoltman
Copy link
Contributor

@bryanoltman bryanoltman commented Feb 27, 2024

This change allows consumers of this package to provide their own authorization and token endpoints for use with non-Google OAuth providers.

This is accomplished through the introduction of an AuthEndpoints class, which has properties for these two URIs. There is a single concrete subclass of AuthEndpoints in this package for the Google values (GoogleAuthEndpoints). Consumers wishing to support other providers should subclass AuthEndpoints and provide the appropriate URIs for the provider they wish to support.

Most of the exported APIs now accept an AuthEndpoints parameter whose default value is GoogleAuthEndpoints.

This change should be non-breaking and transparent to existing users.

Fixes #596

Note: there are some added tests in auth_code_test.dart that aren't directly relevant to this PR. They were added in Shorebird's fork to satisfy our coverage checks. Happy to remove them to make this PR cleaner/more focused.

@kevmoo
Copy link
Collaborator

kevmoo commented Feb 27, 2024

How 'bout a changelog entry?

@bryanoltman
Copy link
Contributor Author

Done. Wasn't sure about versioning, but a minor bump seemed appropriate.

@kevmoo
Copy link
Collaborator

kevmoo commented Feb 27, 2024

HOLY COW! That is some DEEP injection. 🙃

@kevmoo kevmoo self-requested a review February 27, 2024 16:59
@kevmoo kevmoo merged commit fae1690 into google:master Feb 27, 2024
22 checks passed
@kevmoo
Copy link
Collaborator

kevmoo commented Feb 27, 2024

published!

@bryanoltman
Copy link
Contributor Author

Awesome! Thanks for the help and quick attention

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow support for non-Google auth providers
2 participants