mkhorasani/Streamlit-Authenticator

gatherUsageStats = false prevents cookie login

Closed this issue · 2 comments

I have been a very happy user of this repo for months - automatically logging in with a cookie is SO nice!

I just noticed some odd behaviour that took me several hours to debug today.

If you edit your .streamlit/config.toml to disable gathering of usage stats:

[browser]
gatherUsageStats = false

Then 9/10 times the authenticator = stauth.Authenticate(...) will not find the cookies and require that odd fix of placing a sleep() call afterwards.

Anyway - the sleep() fix was not consistent across devices and when run on localhost vs hosted. This was EXTREMELY disappointing and I thought there must have been some update to this repo that broke my site. I was worried I'd have to find another solution.

Nope... I reverted gatherUsageStats = true and my code was fixed instantly.

If anything, can we explain this behaviour or, in some way, mitigate? I'd rather not have usage data collected one core goal of making a self-hosted streamlit app is privacy...

Could you please provide the full error?

I think the mistake was on my end - I'd like to close this issue.