-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: adds ability to provide redirect uri #58
Conversation
pydata_google_auth/auth.py
Outdated
"auth_uri": GOOGLE_AUTH_URI, | ||
"token_uri": GOOGLE_TOKEN_URI, | ||
} | ||
} | ||
|
||
def run_webapp(self, |
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.
I think this might be slightly easier to follow if we rename "self" to "flow" or something similar. AFAIK, the name "self" is only a convention, and even if we're monkeypatching, I think a different name would be easier to follow.
Also, if we're passing in redirect_uri
does this actually need to be a closure function? Could we move this to a private method of the auth
module?
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.
Done.
pydata_google_auth/auth.py
Outdated
@@ -263,7 +301,10 @@ def get_user_credentials( | |||
if use_local_webserver: | |||
credentials = _webserver.run_local_server(app_flow) | |||
else: | |||
credentials = app_flow.run_console() | |||
flow.InstalledAppFlow.run_webapp = run_webapp | |||
credentials = app_flow.run_webapp(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.
As far as I can tell, we only use public methods in run_webapp
. I wonder if monkeypatching is actually necessary?
credentials = app_flow.run_webapp(redirect_uri=redirect_uri) | |
credentials = run_webapp(app_flow, 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.
Done.
@chalmerlowe, I got an email stating the deprecation scheduled onset May 1st.
According to definition of OOB, it still an OOB activity and users will still need to copy/paste the token.
|
WIP PR for discussion: aiming to provide the ability to include a redirect URI, client ID, and client secrets to facilitate the migration away from "out of band" (OOB) OAuth authentication.
NOTE: the OOB process is sunsetting in January so this update will be important to incorporate prior to then.
@tswast
See also changes in these repos: