googleapis / google-auth-library-python-oauthlib

Apache License 2.0
186 stars 82 forks source link

InstalledAppFlow for web applications #341

Closed mafrosis closed 7 months ago

mafrosis commented 7 months ago

Hi there

I'm working with a Google Calendar library which imports this library as a helper for the oauth flow.

I found that since last time I did this, the OOB flow is now deprecated. So, I was fiddling with redirects and trying to get something working. I'm working on a web app, but this library implements run_local_server to start a local webserver..

So, it seems that this library is aimed at the desktop flow only? Or am I missing something?

Thanks!

arithmetic1728 commented 7 months ago

If you have an endpoint listening to the redirect url, probably you can use this class https://github.com/googleapis/google-auth-library-python-oauthlib/blob/main/google_auth_oauthlib/flow.py#L98 to set up the redirect url.

We haven't done anything like this before because our main focus is desktop applications.

mafrosis commented 7 months ago

Thanks, makes sense. A small patch on the Google Calendar library should handle this using the Flow class directly 👍