dashboard
dashboard copied to clipboard
Dashboard doesn't remember auth session upon reload of main page
Describe the bug
After logging in, if the user reloads page when on http://localhost:8501/, they have to log in again.
I think this is because the Authenticate function in main.py takes a while, while the auth check that happens afterwards occurs before the variable is initialized.
st.session_state.authenticator = Authenticate(
config['credentials'],
config['cookie']['name'],
config['cookie']['key'],
config['cookie']['expiry_days'],
config['preauthorized']
)
if st.session_state["authentication_status"]:
config["credentials"] = st.session_state.authenticator.credentials