Created
January 4, 2022 09:24
-
-
Save velicanu/bfb869f1de17fd2b01c87fdf8ea59e17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
To use: | |
# in a python3 virtual env | |
pip install streamlit | |
streamlit run password_reset.py | |
""" | |
import streamlit as st | |
def main(): | |
db_user = {"email": "foo", "password": "bar"} | |
email = st.text_input("email", type="default") | |
password = st.text_input("password", type="password") | |
user = {"email": email, "password": password} | |
if db_user == user: | |
st.write(f"{email} logged in") | |
else: | |
st.write("invalid cred") | |
st.button("Reset password", on_click=reset_password, kwargs={"email": email}) | |
def reset_password(email): | |
st.write(f"reset password logic {email}") | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment