Shafeek Saleem commited on
Commit
b20b93b
·
1 Parent(s): b2767c5
Files changed (1) hide show
  1. utils/login.py +13 -11
utils/login.py CHANGED
@@ -14,17 +14,19 @@ def initialize_login():
14
  password = st.text_input("Password", type="password")
15
 
16
  if st.button("Login"):
17
- authorized = authenticate(username, password)
18
- if authorized["status"]:
19
- st.session_state["login"] = authorized
20
- os.makedirs(
21
- os.path.join(".sessions", st.session_state["login"]["username"]),
22
- exist_ok=True,
23
- )
24
- st.success("Login Successful!")
25
- st.experimental_rerun()
26
- else:
27
- st.error("Invalid username or password")
 
 
28
  else:
29
  st.sidebar.success(f'Hello, {st.session_state["login"]["Name"]}!')
30
 
 
14
  password = st.text_input("Password", type="password")
15
 
16
  if st.button("Login"):
17
+ # authorized = authenticate(username, password)
18
+ # if authorized["status"]:
19
+ # st.session_state["login"] = authorized
20
+ # os.makedirs(
21
+ # os.path.join(".sessions", st.session_state["login"]["username"]),
22
+ # exist_ok=True,
23
+ # )
24
+ # st.success("Login Successful!")
25
+ # st.experimental_rerun()
26
+ # else:
27
+ # st.error("Invalid username or password")
28
+ st.success("Login Successful!")
29
+ st.experimental_rerun()
30
  else:
31
  st.sidebar.success(f'Hello, {st.session_state["login"]["Name"]}!')
32