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

Handle deprecated OOB OAuth flow #32

Open
rebkwok opened this issue Apr 19, 2023 · 4 comments
Open

Handle deprecated OOB OAuth flow #32

rebkwok opened this issue Apr 19, 2023 · 4 comments
Assignees

Comments

@rebkwok
Copy link

rebkwok commented Apr 19, 2023

OOB OAuth authentication has been deprecated and will be disabled on 1st May 2023.

This means that the prompt to go to a URL to get a token to copy/paste to authenticate with big query will no longer work; if pandas is upgraded past 1.5.0, it will default to using the local webserver flow, but with the very old versions of pandas that are allowed in this package (>=0.24) it will default to using the console flow.

Any notebooks using this package, or the datalab-jupyter image which depends on it (or pandas-gpq directly) will need to upgrade to a newer form of authentication. For notebooks, it will need to load credentials from the environment; these will need to be kept secure
https://googleapis.dev/python/pandas-gbq/latest/howto/authentication.html

See this thread: https://bennettoxford.slack.com/archives/C31D62X5X/p1681815645435669

inglesp added a commit that referenced this issue May 1, 2023
Addresses #32 (although further work required to get this into
datalab-juypter docker image)
inglesp added a commit that referenced this issue May 1, 2023
Addresses #32 (although further work required to get this into
datalab-juypter docker image)
@inglesp inglesp self-assigned this May 12, 2023
@inglesp
Copy link
Contributor

inglesp commented May 12, 2023

I timeboxed a day for this and have got nowhere. I'm confused by Google's auth workflows, am stuck in dependency hell, and don't have anything like a coherent strategy for making progress.

The good news is that notebooks that use ebmdatalab.bq.cached_read continue to work (with a warning) even though we're after 1st May.

@inglesp
Copy link
Contributor

inglesp commented May 16, 2023

This was addressed in #35. However, we can't update the docker images because of ebmdatalab/datalab-jupyter#8.

Users can work around this, by changing:

df = bq.cached_read(sql, ...)

to:

df = bq.cached_read(sql, ..., auth_local_webserver=True)

See this Slack thread.

@inglesp inglesp closed this as completed May 16, 2023
@sebbacon sebbacon reopened this Aug 1, 2023
@sebbacon
Copy link
Contributor

sebbacon commented Aug 1, 2023

This is still not working, per Slack thread linked to above.

@sebbacon
Copy link
Contributor

sebbacon commented Aug 1, 2023

Error reported by @richiecroker:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants