Spaces:
Sleeping
Sleeping
Update google_function.py
Browse files146 unmodified lines1471481491501511521531541551567 unmodified lines164165166167168169170146 unmodified linesst.write("Welcome to My App!")auth_code = st.query_params.get("code")flow = InstalledAppFlow.from_client_secrets_file("./credentials.json", SCOPES, redirect_uri='https://matteoscript-streamlitchat-new.hf.space')print(flow)if auth_code:flow.fetch_token(code=auth_code)credentials = flow.credentialsst.write("Login Done")user_info_service = build(serviceName="oauth2",7 unmodified lineselse:authorization_url, state = flow.authorization_url(include_granted_scopes="true",)print(authorization_url)webbrowser.open_new_tab(authorization_url)def connetti_google_2():load_dotenv()146 unmodified lines1471481491501511521531541557 unmodified lines163164165166167168169170146 unmodified linesst.write("Welcome to My App!")auth_code = st.query_params.get("code")flow = InstalledAppFlow.from_client_secrets_file("./credentials.json", SCOPES, redirect_uri='https://matteoscript-streamlitchat-new.hf.space')if auth_code:flow.fetch_token(code=auth_code)creds = flow.credentialsst.write("Login Done")user_info_service = build(serviceName="oauth2",7 unmodified lineselse:authorization_url, state = flow.authorization_url(include_granted_scopes="true",)print(authorization_url)st.markdown(f'<a href="{authorization_url}">Click here to sign in with Google</a>', unsafe_allow_html=True)return credsdef connetti_google_2():load_dotenv()
google_function.py+3-3