This implements the possibility to automatically save the hashed_passwords as a file (with the .generate method), and load it (with the .Authenticate method).
A .key file is then automatically generated at path_to_folder/hashed_passwords1546.key1546 here is a random number generated when .Hasher.generate() is called.
Then, when you need to use hashed_passwords, you can use the legacy way with hashed_passwords being a list:
This PR is related to issue https://github.com/mkhorasani/Streamlit-Authenticator/issues/9
This implements the possibility to automatically save the hashed_passwords as a file (with the .
generate
method), and load it (with the.Authenticate
method).The workflow looks like this:
A .key file is then automatically generated at
path_to_folder/hashed_passwords1546.key
1546
here is a random number generated when.Hasher.generate()
is called.Then, when you need to use
hashed_passwords
, you can use the legacy way withhashed_passwords
being a list:Or you can alternatively use the saved
hashed_passwords1546.key
file:Signed-off-by: Alexandre Duverger alexandre.duverger@solution-bi.com