mkhorasani/Streamlit-Authenticator

Modified version to accept dict or pymongo.collection.Collection as credentials

Closed this issue · 1 comments

Dear developers,

recently I tried to use the streamlit-authenticator-mongo project to use a backend with mongodb, but the code is buggy and it is not completely compatible with the your project.
So I decided to make some modifications to your original project to maintain compatibility with the credentials passed as dict and to add the possibility to pass a MongoDB Collection object. I made some tests and it seems to work fine.

Each document in the mongo db is as follows:
{username : ,
data: { name: <>,
password: <>,
email: <>,
logged_in: <>}
}
Same fields of the original dict are used.

If you are interested in my modifications, I send you the authenticate.py code, the only source I have modified. If it is ok for you, merge it on your code.

Regards.
Livius
authenticate.zip

Thank you!