auth 2
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import streamlit as st
|
|
4 |
# Authentication function
|
5 |
def check_password():
|
6 |
"""Returns `True` if the user had the correct password."""
|
7 |
-
st.write(st.secrets)
|
8 |
|
9 |
def password_entered():
|
10 |
"""Checks whether a password entered by the user is correct."""
|
@@ -80,11 +80,16 @@ def check_password():
|
|
80 |
):
|
81 |
st.error(
|
82 |
"😕 User not known or password incorrect"
|
83 |
-
+ "the username is "
|
84 |
-
+ st.secrets["username"]
|
85 |
-
+ " and the password is "
|
86 |
-
+ st.secrets["password"]
|
|
|
|
|
87 |
)
|
|
|
|
|
|
|
88 |
|
89 |
# Login form with improved input fields
|
90 |
st.text_input("Username", key="username", placeholder="Enter your username")
|
|
|
4 |
# Authentication function
|
5 |
def check_password():
|
6 |
"""Returns `True` if the user had the correct password."""
|
7 |
+
# st.write(st.secrets)
|
8 |
|
9 |
def password_entered():
|
10 |
"""Checks whether a password entered by the user is correct."""
|
|
|
80 |
):
|
81 |
st.error(
|
82 |
"😕 User not known or password incorrect"
|
83 |
+
# + "the username is "
|
84 |
+
# + st.secrets["username"]
|
85 |
+
# + " and the password is "
|
86 |
+
# + st.secrets["password"]
|
87 |
+
# + st.session_state["username"]
|
88 |
+
# + st.session_state["password"]
|
89 |
)
|
90 |
+
print(st.session_state["username"])
|
91 |
+
print(st.session_state["password"])
|
92 |
+
print(st.session_state["password_correct"])
|
93 |
|
94 |
# Login form with improved input fields
|
95 |
st.text_input("Username", key="username", placeholder="Enter your username")
|