i have a problem when i login don’t login and when i submit button without put info status was false not none
this is my code:
import streamlit as st
import pickle as pk
from pathlib import Path
import streamlit_authenticator as stauth
st.title("authetication app")
names = ["amine laam","amine laamim"]
usernames = ["aminek47","aminek007"]
cred = {"usernames":{}}
file = Path(__file__).parent/"hached.pk1"
with file.open("rb") as myfile:
codes = pk.load(myfile)
for user,name,code in zip(usernames,names,codes):
dic = {"names":name,"codes":code}
cred["usernames"].update({user:dic})
auth = stauth.Authenticate(cred,"cooki","abcd",cookie_expiry_days=0)
name,status,username = auth.login("login","main")
if status:
st.success(f"you are connected with this username {username}")
st.write("name " + str(name))
st.write("status " + str(status))
st.write("username " + str(username))
if status == False:
st.error("username or password are false")
st.write("name " + str(name))
st.write("status " + str(status))
st.write("username " + str(username))
if status == None:
st.warning("empty info")
st.write("name " + str(name))
st.write("status " + str(status))
st.write("username " + str(username))
st.write(cred)