mkhorasani / Streamlit-Authenticator

A secure authentication module to manage user access in a Streamlit application.
Other
1.64k stars 257 forks source link

TypeError: __init__() got multiple values for argument 'cookie_expiry_days' #22

Closed shg-omp closed 2 years ago

shg-omp commented 2 years ago

Hi,

We were able to use the following code with version 0.1.5 but after the update it started throwing this error. Please see the code below.

names = ['NAME']
usernames = ['USERNAME']
passwords = ['PASSWORD']

hashed_passwords = stauth.Hasher(passwords).generate()
authenticator = stauth.Authenticate(names,
                                    usernames,
                                    hashed_passwords,
                                    'some_cookie_name',
                                    'some_signature_key',
                                    cookie_expiry_days=30)

name, authentication_status, username = authenticator.login('Login','main')
estaar commented 2 years ago

I am also experiencing the same issue on updating to recent version.

mkhorasani commented 2 years ago

Please note that as of v0.2.1 the credentials must be supplied as one combined dictionary, where names, usernames and hashed passwords are combined into 1 argument not 3. Please refer to the readme file in this repository for further instructions.