Spaces:
Runtime error
Runtime error
IsaacKerson commited on
try auth fuction in login page
Browse files- pages/login.py +10 -9
pages/login.py
CHANGED
|
@@ -32,12 +32,13 @@ def app():
|
|
| 32 |
st.write(auth.get_path())
|
| 33 |
st.write(auth.get_connection())
|
| 34 |
st.write(auth.check_connection())
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
| 32 |
st.write(auth.get_path())
|
| 33 |
st.write(auth.get_connection())
|
| 34 |
st.write(auth.check_connection())
|
| 35 |
+
|
| 36 |
+
auth.login('Login', 'main')
|
| 37 |
+
|
| 38 |
+
if st.session_state['authentication_status']:
|
| 39 |
+
auth.logout('Logout', 'main')
|
| 40 |
+
st.title('Some content')
|
| 41 |
+
elif st.session_state['authentication_status'] == False:
|
| 42 |
+
st.error('Username/password is incorrect')
|
| 43 |
+
elif st.session_state['authentication_status'] == None:
|
| 44 |
+
st.warning('Please enter your username and password')
|