My app google auth works when run localy, when i deploy to cloud it doesn’t work. The user.is_logged_in comes out as false after authenticating via google auth.
The app is deployed on streamlit cloud- https://classicfootballshirts-selfservicebi.streamlit.app/
The repo is here: alexanderobinali-cloud/CFS_SELF_SERVICE_BI: CFS self service app
The login pane is :
@st.dialog("🔐 App Login Required", width="small", dismissible=False)
def login_screen():
st.header("This app is private.")
st.subheader("Please log in.")
st.write("Current user object:", st.user)
st.button("Log in with Google", on_click=st.login)
The check:
if not st.user.is_logged_in:
login_screen()
elif '@sstest.co.uk' not in st.user.email:
st.error("Access denied. Please log in with your @sstest.co.uk account.", icon="🚨")
st.stop()
The google login redirects to -https://testdomain.streamlit.app/
This code works on local dev mode, when i deploy it the st.user.islogged in comes up as false. Any help would be appreciated. Thank you