Persistent user login for Streamlit community cloud app?

I have an app hosted on the community cloud:
I want to add a user login component to this to retain user history and implement a leaderboard of sorts.

I am currently trying the streamlit_login_auth_ui component, but it saves new users in a _secret_auth.json file, which I believe will be overwritten whenever a new version of the app is deployed to the cloud?

Is there a component that would let me enable user login that remains persistent? I would also prefer to retain an option for the users to access the dashboard as a guest without logging in.

Thanks in advance!

Hello @sakp7 ,

Thank you for your suggestions!
I am not able to find the streamlit_firebase_auth library. Can you please share a link?

There is no such library, it was invented by some LLM.

1 Like

Any way to unlike a post? :slight_smile:

(If you accidentally click a reaction, you can click on it again to take it back. Edit: Apparently only for a brief period of time before it locks…)

How secure of system are you desiring? If you want simplicity, you could just set up an external data source to save username, pin/password, and whatever saved info you want per user. I would not recommend a homebrewed-from-scratch solution for anything of importance but if it’s a low-stakes game and users are warned accordingly it may be sufficient until easier implementations are available if you don’t want to build a custom component yourself. (Just make sure to warn users that the pin/password is not stored encrypted, so please don’t use your debit card pin or a password from another system! :crazy_face:)

1 Like


The option to click seems to be unavailable for some reason once already reacted.

Security is not a concern. I just want some user login and identification to save user history across sessions.
I think I’ll build one myself using an external data source. Thanks :slight_smile:

1 Like

Hello @sakp7 ,

I cannot find your responses anymore, but I hope you realize how counterproductive your response was for me. Not only did it not help in the first place, but I wasted time researching a solution that didn’t even exist.

Please don’t do this. There is a reason StackOverflow does not allow such responses anymore.


Just wanted to update you that I was able to set-up a login form :slight_smile:

It lets you:

  • Create a new account
  • Login as an existing user, or
  • Play as a guest

Would be great if you could take a look and let me know what you think :pray:
Spellbee · Streamlit

1 Like

Looks good! Glad it worked out.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.