-
Notifications
You must be signed in to change notification settings - Fork 83
Allow access_type parameter to be overriden #16
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Nits are yours to reject or satisfy.
@@ -107,6 +112,7 @@ def __init__(self, oauth2session, client_type, client_config): | |||
"""Mapping[str, Any]: The OAuth 2.0 client configuration.""" | |||
self.oauth2session = oauth2session | |||
"""requests_oauthlib.OAuth2Session: The OAuth 2.0 session.""" | |||
self.redirect_uri = redirect_uri |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want a docstring for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's already one for it below (it's a property)
@@ -200,9 +206,9 @@ def authorization_url(self, **kwargs): | |||
:class:`Flow` instance to obtain the token, you will need to | |||
specify the ``state`` when constructing the :class:`Flow`. | |||
""" | |||
kwargs.setdefault('access_type', 'offline') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably worth updating the docstring to explain that access_type=offline
will be added if not passed in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D'oh
@@ -229,10 +235,9 @@ def fetch_token(self, **kwargs): | |||
:meth:`credentials` to obtain a | |||
:class:`~google.auth.credentials.Credentials` instance. | |||
""" | |||
kwargs.setdefault('client_secret', self.client_config['client_secret']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KeyError
ouch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's okay if that happens (for now at least)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.