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

Run gspread-pandas on a remote server and authenticate at the user browser using OAuth #90

Open
bmt8 opened this issue Aug 4, 2022 · 3 comments

Comments

@bmt8
Copy link

bmt8 commented Aug 4, 2022

Is it possible to run the gspread-pandas on a remote-server (like aws ec2) and allow the user to authenticate using their local browser (google chrome on their machines)?

I have a use case where I'd create ephemeral VMs/Containers and let users SSH into it and thei use their own google credentials (which demands OAuth).
I tried this but when the gspread-pandas prompts the link to login to google and the user open it on their local browser (localhost), they can fill the google info but at the last screen it can't redirect back to the server, and the terminal which is running the python script keeps waiting the login (which already broke).

I may need to open a ssh-tunnel between local host and the remote server so the python script on remote can listen to the 8182 of the local browser?

Thanks

@aiguofer
Copy link
Owner

aiguofer commented Oct 7, 2022

Hi, sorry for the delayed response. Unfortunately I believe that workflow was broken with Google's recent deprecation of OOB flow. They have the following page which might be helpful: https://developers.google.com/identity/protocols/oauth2/resources/oob-migration.

I think the easiest option is to either run it locally and copy the config over, or use a service account, but it's possible the tunnel might work.

@aiguofer
Copy link
Owner

aiguofer commented Oct 7, 2022

If you find a solution, a contribution to the README for others would be really helpful!

@zakelhjouji
Copy link

@bmt800 were you able to figure out a solution to this? Thanks!

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