mkhorasani / Streamlit-Authenticator

A secure authentication module to validate user credentials in a Streamlit application.
Apache License 2.0
1.38k stars 229 forks source link

What's the recommended way to store login info as secrets? #27

Closed batmanscode closed 1 year ago

batmanscode commented 1 year ago

Using a yaml>toml converter it's possible to store the entire yaml configuration as a secret using streamlit cloud, which works as expected.

For deploying from other services, how can leverage environment variables?

mkhorasani commented 1 year ago

Dear @batmanscode, if you are deploying on Streamlit Cloud (Streamlit's own servers) they have their own implementation of environment secrets which you may read more about here. If you are deploying on other servers such as Heroku, each platform may have its own way of storing secrets which you will have to enquire about separately. Hope this helps.

batmanscode commented 1 year ago

Thanks @mkhorasani . As I said it was easy to store the whole yaml as a secret in Streamlit cloud

For heroku if I wanted to save part of the yaml file as a secret I found this library: https://github.com/mkaranasou/pyaml_env