Streamlit-Authenticator icon indicating copy to clipboard operation
Streamlit-Authenticator copied to clipboard

Streamlit-Authenticator - Transition from login page to main page is rough

Open anujwwt opened this issue 3 years ago • 5 comments

Hi Mohamed - the transition from login page to main page for our app is very rough. i see login page for few seconds overlayed with main page which decreases the user experience. can you rectify the issue please.

anujwwt avatar Sep 12 '22 12:09 anujwwt

Hi @anujwwt, this is a known issue related to reading the reauthentication cookie. Once a solution has been found a release will be made. Regards.

mkhorasani avatar Sep 12 '22 12:09 mkhorasani

Hi @anujwwt, this is a known issue related to reading the reauthentication cookie. Once a solution has been found a release will be made. Regards.

I really wait for a solution to this problem.

roliii avatar Oct 05 '22 21:10 roliii

Hi @anujwwt, still haven't found a solution to this issue. In the meantime, please feel free to take a crack at it yourself! I'd be happy to pull any changes you make. Cheers.

mkhorasani avatar Oct 06 '22 08:10 mkhorasani

@anujwwt @mkhorasani I managed to get round the appearance of the form every time, there is a problem when logging in, but that's a detail. with st.spinner('Loading...'): time.sleep(0.2) name, authentication_status, username = authenticator.login('Login', 'main') Perhaps it would be possible to make a login page to which the application redirects if someone is not logged in. I managed to carve out a registration page, but that's not a good solution either.

roliii avatar Oct 06 '22 09:10 roliii

@anujwwt @mkhorasani The best way to do this is to put login forms inside of st.empty() container, then once you're logged in destroy the container with container.empty(), and then, in order to bypass a bug in Streamlit, sleep for a hundredth of second - time.sleep(0.01). This makes logged out -> logged in transition extremely smooth.

vovavili avatar Feb 25 '23 23:02 vovavili

Dear all please check the latest release v0.3.2.

mkhorasani avatar Mar 27 '24 21:03 mkhorasani