I am struggling to get Google OAuth to work in my Python 3.10 Streamlit application when it is deployed to the Community Cloud.
Note that I have gotten numerous options to work locally but none of them work when they are deployed. I fixed the code for this control - New Component: ๐ Google authentification and Sign In with Google button - #7 by Ken_Tola - but it fails when deployed. In this case, you can literally copy and paste the URL from the main page of the app into a separate tab and it authenticates. If you try clicking the link in the hosted app, you get a generic Google error.
I have tried using both flow.fetch() and flow.run_local_server() - both of which work locally but both of which throw webbrowser.py not found errors in the Cloud. These errors are being caused by Googleโs Flow.py file as webbrowser.py has been a core library in Python since 3.0. For some reason it does not exist in the Community Cloud and there is no Requirements.txt entry to force its deployment.
I am completely stuck and I could really use some help - has anybody actually deployed Google OAuth 2.0 to the Community Cloud and had it work? If so, can you please share code on how you got it to work?
I submitted a ticket to Streamlit support about this issue but they told me to post here so I am hoping somebody here has overcome this issue!
Thank you!