On some days, this module continues to re-direct and show the login button. I have been able to solve the issue by updating time.sleep() to 2.0 seconds in the check_authentification() function.
To hide the login button during this sleep, the following seems to do the trick:
if 'user_info' in st.session_state and ( st.session_state["user_info"].get("email").lower() in email_list ):
# app here
elif st.session_state["connected"] and (
st.session_state["user_info"].get("email").lower() not in email_list
):
st.text("Unauthorized!")
else:
st.session_state["authenticator"].login()
On some days, this module continues to re-direct and show the login button. I have been able to solve the issue by updating
time.sleep()
to 2.0 seconds in thecheck_authentification()
function.To hide the login button during this sleep, the following seems to do the trick: