Hi, I would like some help, please.
I’m trying to make my app private, so only a certain user with its password can have access to the data provided in the application. The reason is that we are using confidential data.
So, since Streamlit reads the code every time from the very beginning, how can I keep my app running, without asking the user its username and password more than once?
Every time I change some widget, the runs all over again. And, @st.cache was not built to keep a user logged in if I’m right.
Thank you very much, in advance.
Here is my code:
return user == “email@example.com”
return password == “admin”
block1 = st.empty()
block2 = st.empty()
return block1, block2
for block in blocks:
return blocks.text_input(“Password:”, value="", type=“password”)
** here is the function that runs in the app
login_blocks = generate_login_block()
user = login1(login_blocks)
password = login2(login_blocks)