dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Dashboard doesn't remember auth session upon reload of main page

Open fengtality opened this issue 2 years ago • 0 comments

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

Steps to reproduce bug

fengtality avatar Oct 15 '23 22:10 fengtality