YusufBerki / streamlit-jwt-authenticator

Apache License 2.0
11 stars 0 forks source link

Authentication does not work #1

Open visvaldas01 opened 5 months ago

visvaldas01 commented 5 months ago

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"]) after authenticator.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

ykon550 commented 4 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.

visvaldas01 commented 4 months ago

Thanks! I used your code, now login works but logout still doesn't :(