mkhorasani / Streamlit-Authenticator

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

Unable to login #207

Closed alibabadoufu closed 2 months ago

alibabadoufu commented 2 months ago

Hi I have the latest pip version installed.

When I tried to do this, I still couldn't log in. Anyone has any idea why's that so?


import streamlit_authenticator as stauth
from streamlit_authenticator import Hasher

with open('frontend/auth/config.yaml') as file:
    config = yaml.load(file, Loader=SafeLoader)

# Pre-hashing all plain text passwords once
credentials = Hasher.hash_passwords(config['credentials'])

authenticator = stauth.Authenticate(
    credentials,
    config['cookie']['name'],
    config['cookie']['key'],
    config['cookie']['expiry_days'],
    config['pre-authorized']
)
alibabadoufu commented 2 months ago

My fault, it should work here. I used the wrong username.