My google oauth2 redirect is super slow. It works, but the redirect takes like 5 minutes. here is my code :import streamlit as st
b = st.button(‘button’)
if b:
st.login(‘google’)
st.json(st.user)
My google oauth2 redirect is super slow. It works, but the redirect takes like 5 minutes. here is my code :import streamlit as st
b = st.button(‘button’)
if b:
st.login(‘google’)
st.json(st.user)
Welcome to the Streamlit community and thanks for your question!
If your Google OAuth2 redirect is taking several minutes, that’s not expected—Streamlit’s built-in authentication with st.login("google") should redirect almost instantly if everything is configured correctly. Slow redirects are usually caused by misconfigured redirect URIs, network issues, or problems with the identity provider setup.
Please double-check that your redirect_uri in .streamlit/secrets.toml matches exactly what you registered in the Google Cloud Console, and that your app and Google project are both using the correct URLs. Also, ensure your server_metadata_url is set to https://accounts.google.com/.well-known/openid-configuration. For a working example and setup steps, see the official Google Auth Platform tutorial. If the configuration is correct and the issue persists, try testing on a different network or browser to rule out local connectivity issues.
Sources: