mirror of
https://github.com/aljazceru/hummingbot-dashboard.git
synced 2025-12-24 08:44:22 +01:00
fix/streamlit-auth-issue
This commit is contained in:
6
main.py
6
main.py
@@ -110,17 +110,17 @@ elif st.session_state["authentication_status"]:
|
||||
dump_dict_to_yaml(config, "credentials.yml")
|
||||
with st.sidebar:
|
||||
st.write(f'Welcome {st.session_state["name"]}!')
|
||||
st.session_state.authenticator.logout('Logout', 'sidebar')
|
||||
st.session_state.authenticator.logout(location='sidebar') # Updated logout call
|
||||
main_page()
|
||||
else:
|
||||
show_pages([
|
||||
Page("main.py", "Hummingbot Dashboard", "📊"),
|
||||
])
|
||||
name, authentication_status, username = st.session_state.authenticator.login('Login', 'main')
|
||||
name, authentication_status, username = st.session_state.authenticator.login(location='main') # Updated login call
|
||||
if st.session_state["authentication_status"] == False:
|
||||
st.error('Username/password is incorrect')
|
||||
elif st.session_state["authentication_status"] == None:
|
||||
st.warning('Please enter your username and password')
|
||||
st.write("---")
|
||||
st.write("If you are pre-authorized, you can login with your pre-authorized mail!")
|
||||
st.session_state.authenticator.register_user('Register', 'main')
|
||||
st.session_state.authenticator.register_user(location='main') # Updated register user call
|
||||
|
||||
Reference in New Issue
Block a user