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

Endless re-direct back to login #11

Open
strefli3 opened this issue Sep 1, 2024 · 0 comments
Open

Endless re-direct back to login #11

strefli3 opened this issue Sep 1, 2024 · 0 comments

Comments

@strefli3
Copy link

strefli3 commented Sep 1, 2024

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant