doc: Document verify_oauth2_token raises ValueError#928
Merged
arithmetic1728 merged 3 commits intogoogleapis:mainfrom Jan 7, 2022
Conversation
These `ValueError`s can be raised by `google.auth.jwt.decode` e.g.: * https://github.com/googleapis/google-auth-library-python/blob/8f1e9cfd56dbaae0dff64499e1d0cf55abc5b97e/google/oauth2/id_token.py#L162 * https://github.com/googleapis/google-auth-library-python/blob/8f1e9cfd56dbaae0dff64499e1d0cf55abc5b97e/google/oauth2/id_token.py#L135 * https://github.com/googleapis/google-auth-library-python/blob/8f1e9cfd56dbaae0dff64499e1d0cf55abc5b97e/google/auth/jwt.py#L255 Handling of this is noted in the user docs [1] [1] https://developers.google.com/identity/sign-in/web/backend-auth
b743063 to
2afc8bf
Compare
arithmetic1728
approved these changes
Dec 15, 2021
verify_oauth2_token raises ValueErrorverify_oauth2_token raises ValueError
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Jan 20, 2022
🤖 I have created a release *beep* *boop* --- ## [2.4.0](v2.3.3...v2.4.0) (2022-01-20) ### Features * add 'py.typed' declaration ([#919](#919)) ([c993504](c993504)) * add api key support ([#826](#826)) ([3b15092](3b15092)) ### Bug Fixes * **deps:** allow cachetools 5.0 for python 3.7+ ([#937](#937)) ([1eae37d](1eae37d)) * fix the message format for metadata server exception ([#916](#916)) ([e756f08](e756f08)) ### Documentation * fix intersphinx link for 'requests-oauthlib' ([#921](#921)) ([967be4f](967be4f)) * note ValueError in `verify_oauth2_token` ([#928](#928)) ([82bc5f0](82bc5f0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
parthea
pushed a commit
to googleapis/google-cloud-python
that referenced
this pull request
Nov 26, 2025
🤖 I have created a release *beep* *boop* --- ## [2.4.0](googleapis/google-auth-library-python@v2.3.3...v2.4.0) (2022-01-20) ### Features * add 'py.typed' declaration ([#919](googleapis/google-auth-library-python#919)) ([c993504](googleapis/google-auth-library-python@c993504)) * add api key support ([#826](googleapis/google-auth-library-python#826)) ([3b15092](googleapis/google-auth-library-python@3b15092)) ### Bug Fixes * **deps:** allow cachetools 5.0 for python 3.7+ ([#937](googleapis/google-auth-library-python#937)) ([1eae37d](googleapis/google-auth-library-python@1eae37d)) * fix the message format for metadata server exception ([#916](googleapis/google-auth-library-python#916)) ([e756f08](googleapis/google-auth-library-python@e756f08)) ### Documentation * fix intersphinx link for 'requests-oauthlib' ([#921](googleapis/google-auth-library-python#921)) ([967be4f](googleapis/google-auth-library-python@967be4f)) * note ValueError in `verify_oauth2_token` ([#928](googleapis/google-auth-library-python#928)) ([82bc5f0](googleapis/google-auth-library-python@82bc5f0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These
ValueErrors can be raised bygoogle.auth.jwt.decodee.g.:google-auth-library-python/google/oauth2/id_token.py
Line 162 in 8f1e9cf
google-auth-library-python/google/oauth2/id_token.py
Line 135 in 8f1e9cf
google-auth-library-python/google/auth/jwt.py
Line 255 in 8f1e9cf
Handling of this is noted in the user docs [1]
[1] https://developers.google.com/identity/sign-in/web/backend-auth