ChatExchange icon indicating copy to clipboard operation
ChatExchange copied to clipboard

Google OAuth2 Login

Open banksJeremy opened this issue 10 years ago • 1 comments

Not a priority at all, but since it was mentioned, I thought I'd create a ticket to discuss it.

I don't think there's any official way to login to programmatically log in to Google using a username and password, and it might not be the easiest login flow to work through with something like BeautifulSoup. Instead, we might consider just using a real browser login, requiring user interaction. It won't be suitable for all cases, but it will be suitable for many. (Particularly if the login token could be persisted easily; maybe as part of a general Browser serialization mechanism.)

Hopefully we could just create a temporary local web server to run the OAuth authentication and capture the token.

banksJeremy avatar May 10 '14 05:05 banksJeremy

We can simply use the requests library and send a POST request to Google, then to StackExchange. No server needed, the redirect handle it. Just that it is prone to failure whenever Google changes things or if it gives one of those "bad location" errors.

Manishearth avatar May 10 '14 10:05 Manishearth