A service declares its provider's consent-query quirks - #299
Merged
Conversation
czpython
force-pushed
the
connection-identity
branch
from
August 22, 2026 06:01
ca8ba69 to
3baacd0
Compare
Google grants a refresh token only when the consent URL carries access_type=offline and prompt=consent. Until now the only door was subclassing OauthClient and overriding get_oauth_client(), duplicating the whole base construction just to swap the class. OauthClient takes extra_authorize_params and lands them in every consent query it begins; begin_connect's own argument layers over them on a shared key. Service declares them as a ClassVar and get_oauth_client() passes them through, so an extension states the quirk in one line next to its endpoints. Connection also exposes identity — the provider's facts for the sign-in — so extensions read it off the handle, not the row.
czpython
force-pushed
the
authorize-params
branch
from
August 22, 2026 06:05
0e7f49d to
7e56289
Compare
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.
Google grants a refresh token only when the consent URL carries
access_type=offlineandprompt=consent. Until now the only door was subclassingOauthClientand overridingget_oauth_client(), duplicating the whole base construction just to swap the class.OauthClienttakesextra_authorize_paramsand lands them in every consent query it begins;begin_connect's own argument layers over them on a shared key.Servicedeclares them as aClassVarandget_oauth_client()passes them through, so an extension states the quirk in one line next to its endpoints:Connectionalso exposesidentity— the provider's facts for the sign-in — so extensions read it off the handle, not the row.The
identitycolumn the handle reads landed in #298.