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

fix!: update token endpoints to non-deprecated endpoints #466

Merged
merged 8 commits into from
Feb 6, 2025

Conversation

ddelgrosso1
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #388 🦕

@ddelgrosso1 ddelgrosso1 requested a review from a team as a code owner August 23, 2023 14:41
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Aug 23, 2023
@ddelgrosso1
Copy link
Contributor Author

Both of the endpoints changed in this PR are marked as deprecated / extremely deprecated per documentation. Please feel free to reach out for more information.

I also cleaned up some unused variables in tests that were giving linter warnings.

@ddelgrosso1 ddelgrosso1 added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 23, 2023
@ddelgrosso1
Copy link
Contributor Author

Marking do not merge until freeze is over.

@ddelgrosso1 ddelgrosso1 added the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 23, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 23, 2023
src/index.ts Outdated
const GOOGLE_REVOKE_TOKEN_URL =
'https://accounts.google.com/o/oauth2/revoke?token=';
'https://oauth2.googleapis.com/token/revoke?token=';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where did you get this revoke url from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the documentation it said that the revoke old url (accounts.google.com) was extremely deprecated, so I browsed through the proto from the yaqs issue and saw revoke was in there.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. As long as it works, it should be ok.

src/index.ts Outdated
const GOOGLE_TOKEN_URL = 'https://www.googleapis.com/oauth2/v4/token';
const GOOGLE_REVOKE_TOKEN_URL =
'https://accounts.google.com/o/oauth2/revoke?token=';
const GOOGLE_TOKEN_URL = 'https://oauth2.googleapis.com/token';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ddelgrosso1 ddelgrosso1 added the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 20, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 20, 2023
@ddelgrosso1 ddelgrosso1 removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Oct 20, 2023
@ddelgrosso1 ddelgrosso1 added the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 24, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 24, 2023
src/index.ts Outdated
const GOOGLE_REVOKE_TOKEN_URL =
'https://accounts.google.com/o/oauth2/revoke?token=';
const GOOGLE_TOKEN_URL = 'https://oauth2.googleapis.com/token';
const GOOGLE_REVOKE_TOKEN_URL = 'https://oauth2.googleapis.com/revoke?token=';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@d-goog d-goog requested a review from a team as a code owner February 6, 2025 02:53
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Feb 6, 2025
One of the layers of this build system throws with 'reserved' keyword, while typescript itself doesn't
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: m Pull request size is medium. labels Feb 6, 2025
@d-goog d-goog merged commit c7fa356 into googleapis:main Feb 6, 2025
11 of 12 checks passed
@d-goog
Copy link
Contributor

d-goog commented Feb 6, 2025

Merged and will further test this in auth downstream via the release candidate of this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move away from /v4 token endpoint to https://oauth2.googleapis.com/token
5 participants