rairo commited on
Commit
3dd51cc
·
verified ·
1 Parent(s): a99bbe0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -16
app.py CHANGED
@@ -28,23 +28,20 @@ def user_authentication():
28
 
29
  st.header("User Authentication")
30
 
31
- # Ask the user if they are new users or already have an account
32
- user_type = st.radio("Admin", ("Admin"))
33
-
34
- if user_type == "Admin":
35
  # If the user is an existing user, prompt for email and password
36
- email = st.text_input("Email")
37
- password = st.text_input("Password", type="password")
38
- if st.button("Sign In"):
39
- try:
40
- user = auth.get_user_by_email(email)
41
- st.success(f"Welcome back, {user.email}!")
42
- user_id = user.uid
43
- st.session_state.user_id = user_id
44
- st.experimental_rerun()
45
- except auth.UserNotFoundError:
46
- st.error("User not found. Please check your credentials or sign up.")
47
- except Exception as e:
48
  st.error(f"Error during sign-in: {e}")
49
  else:
50
  st.error(f"Error during sign-in")
 
28
 
29
  st.header("User Authentication")
30
 
31
+
 
 
 
32
  # If the user is an existing user, prompt for email and password
33
+ email = st.text_input("Email")
34
+ password = st.text_input("Password", type="password")
35
+ if st.button("Sign In"):
36
+ try:
37
+ user = auth.get_user_by_email(email)
38
+ st.success(f"Welcome back, {user.email}!")
39
+ user_id = user.uid
40
+ st.session_state.user_id = user_id
41
+ st.experimental_rerun()
42
+ except auth.UserNotFoundError:
43
+ st.error("User not found. Please check your credentials or sign up.")
44
+ except Exception as e:
45
  st.error(f"Error during sign-in: {e}")
46
  else:
47
  st.error(f"Error during sign-in")