Spaces:
Sleeping
Sleeping
Update google_function.py
Browse files146 unmodified lines1471481491501501511531521531541557 unmodified lines163164165167166167168169170146 unmodified lines st.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.credentials creds = flow.credentials st.write("Login Done") user_info_service = build( serviceName="oauth2",7 unmodified lines else: authorization_url, state = flow.authorization_url(include_granted_scopes="true",) print(authorization_url) webbrowser.open_new_tab(authorization_url) st.markdown(f'<a href="{authorization_url}">Click here to sign in with Google</a>', unsafe_allow_html=True) return creds
def connetti_google_2(): load_dotenv()google_function.py+3-3