Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fengtality opened this issue Oct 15, 2023 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@fengtality
Copy link
Sponsor Contributor

fengtality commented Oct 15, 2023

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 fengtality added the bug Something isn't working label Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants