IsaacKerson commited on
Commit
f408992
1 Parent(s): 0e4fb92

remove file path printout

Browse files
Files changed (1) hide show
  1. pages/login.py +3 -9
pages/login.py CHANGED
@@ -10,14 +10,13 @@ from pages.utils import *
10
  def app():
11
 
12
  yamel_path = db_path('config.yaml')
13
- st.write(yamel_path)
14
 
15
  with open(yamel_path) as file:
16
  config = yaml.safe_load(file)
17
 
18
  hashed_passwords = Hasher(config['credentials']['passwords']).generate()
19
 
20
- authenticator = Authenticate(
21
  config['credentials']['names'],
22
  config['credentials']['usernames'],
23
  hashed_passwords,
@@ -26,15 +25,10 @@ def app():
26
  cookie_expiry_days=30
27
  )
28
 
29
- # Alternatively you use st.session_state['name'] and
30
- # st.session_state['authentication_status'] to access the name and
31
- # authentication_status.
32
-
33
- authenticator.login('Login', 'main')
34
 
35
  if st.session_state['authentication_status']:
36
- authenticator.logout('Logout', 'main')
37
- st.write('Welcome *%s*' % (st.session_state['name']))
38
  st.title('Some content')
39
  elif st.session_state['authentication_status'] == False:
40
  st.error('Username/password is incorrect')
 
10
  def app():
11
 
12
  yamel_path = db_path('config.yaml')
 
13
 
14
  with open(yamel_path) as file:
15
  config = yaml.safe_load(file)
16
 
17
  hashed_passwords = Hasher(config['credentials']['passwords']).generate()
18
 
19
+ auth = Authenticate(
20
  config['credentials']['names'],
21
  config['credentials']['usernames'],
22
  hashed_passwords,
 
25
  cookie_expiry_days=30
26
  )
27
 
28
+ auth.login('Login', 'main')
 
 
 
 
29
 
30
  if st.session_state['authentication_status']:
31
+ auth.logout('Logout', 'main')
 
32
  st.title('Some content')
33
  elif st.session_state['authentication_status'] == False:
34
  st.error('Username/password is incorrect')