Open visvaldas01 opened 5 months ago
Hello @visvaldas01, I'm not the author,
but I edited utils.py
in this package like following, and succeeded to get it worked on my end.
streamlit re-run again & again when some change happens and I think authentication_status
is also reset everytime when Authenticator
initiated.
Edited
for key in keys:
if key not in st.session_state:
st.session_state[key] = None
Original
for key in keys:
st.session_state[key] = None
Thanks! I used your code, now login works but logout still doesn't :(
Hi, I tried your code but it does not work for me - logout button shows up only for an instant and disappears. It's alright with cookies and backend part, so it seems to me that for some reason
session_state["authentication_status"]
gets reset after login (I have added this line:print(st.session_state["authentication_status"])
afterauthenticator.login()
, and got "True", "False" printed after clicking the button). The only differences in the code are URL and the aforementioned print command.P.S. I also checked your example from here - with the same result. https://medium.com/@yusufberki/implement-jwt-authentication-for-the-streamlit-application-2e3b0ef884ef