You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each time I try to login with streamlit-authentificator into a streamlit application deployed on a kubernetes pod, I have a "Invalid Salt" print in the terminal, without any error. The login windows does not react. I suspect an issue with the bcrypt librairy, but I can't see where : I tried downgrading to 4.0 and 3.2, no chance.
It works fine in local mode, on windows.
An code exemple :
#%%# Importimportstreamlitasstimportstreamlit_authenticatorasstauth#My config variablesusername='my_user'password='my_hashed_password'credentials= {
"usernames":{
username:{
"name":'Equipe',
"password":password
}
}}
# print(credentials)expiry_days=30key='random_signature_key'name='random_cookie_name'authenticator=stauth.Authenticate(credentials, name, key, expiry_days)
#%%# hide collapsed control buttonhide_bar=""" <style> [data-testid='collapsedControl"] {visibility:hidden;} </style> """# %%name, st.session_state['authentication_status'], username=authenticator.login('Login', 'main')
ifst.session_state['authentication_status']:
authenticator.logout('Logout', 'main')
st.sidebar.title(f'Welcome *{name}*!')
# Applicationst.write("## Choisissez l'application qui vous intéresse")
st.write("Cette application vise à exploiter les données des postes sources de manière plus fine que la représentation cartographique.")
st.info("Choisissez l'application qui vous intéresse dans la barre latérale !", icon="◀️")
elifst.session_state['authentication_status'] ==False:
st.error('Username/password is incorrect')
st.session_state.sidebar_state='collapsed'st.markdown(hide_bar, unsafe_allow_html=True)
elifst.session_state['authentication_status'] ==None:
st.warning('Please enter your username and password')
The text was updated successfully, but these errors were encountered:
Hi @BastienGauthier, your password in the config file is not hashed, please use stauth.Hasher(['my_hashed_password']).generate() to hash your password. It should look something like this - $2b$12$E9/bCaN/r8sN/FV2l8NpgOgspUBAp7UAVU6BgsXJzp/pW8gQWCprC
Actually, I wrote "my_hashed_password" not to disclose any credential, but it is hashed in the real configuration file. I use the same on windows and it works : it is really a windows vs kubernetes pods issue. Using the stauth hashing instead of the previous use solved the issue though.
Each time I try to login with streamlit-authentificator into a streamlit application deployed on a kubernetes pod, I have a "Invalid Salt" print in the terminal, without any error. The login windows does not react. I suspect an issue with the bcrypt librairy, but I can't see where : I tried downgrading to 4.0 and 3.2, no chance.
It works fine in local mode, on windows.
An code exemple :
The text was updated successfully, but these errors were encountered: