Skip to content

Commit

Permalink
Merge pull request #114 from hummingbot/fix/streamlit-auth-issue
Browse files Browse the repository at this point in the history
fix/streamlit-auth-issue
  • Loading branch information
cardosofede authored Feb 2, 2024
2 parents 2d8086c + 5058bb6 commit 73722c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,17 @@ def main_page():
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

0 comments on commit 73722c2

Please sign in to comment.