RajaThor commited on
Commit
3ca5746
·
verified ·
1 Parent(s): ff0bc47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -20
app.py CHANGED
@@ -376,28 +376,23 @@ def authenticate_user_ui():
376
  main()
377
  else:
378
  st.error("Authentication failed. Please check your email and password.")
379
-
380
  elif tabs == "Sign-Up":
381
- if st.session_state.auth_state["signed_in"]:
382
- st.sidebar.button("Sign Out", on_click=logout)
383
- st.title("Welcome!")
384
- main()
385
- else:
386
- email = st.text_input("Enter Email", help="Enter your email address")
387
- password = st.text_input("Enter Password", type="password", help="Enter your password")
388
- confirm_password = st.text_input("Confirm Password", type="password", help="Re-enter your password for confirmation")
389
-
390
- if st.button("Sign-Up"):
391
- if not email or not password or not confirm_password:
392
- st.error("Please fill all the fields.")
393
- elif password != confirm_password:
394
- st.error("Passwords do not match.")
395
  else:
396
- success, uid = create_user(email, password)
397
- if success:
398
- st.success(f"User with UID: {uid} created successfully! You can now log in.")
399
- else:
400
- st.error("User creation failed. Please try again.")
401
 
402
  # Log out user
403
  def logout():
 
376
  main()
377
  else:
378
  st.error("Authentication failed. Please check your email and password.")
379
+
380
  elif tabs == "Sign-Up":
381
+ email = st.text_input("Enter Email", help="Enter your email address")
382
+ password = st.text_input("Enter Password", type="password", help="Enter your password")
383
+ confirm_password = st.text_input("Confirm Password", type="password", help="Re-enter your password for confirmation")
384
+
385
+ if st.button("Sign-Up"):
386
+ if not email or not password or not confirm_password:
387
+ st.error("Please fill all the fields.")
388
+ elif password != confirm_password:
389
+ st.error("Passwords do not match.")
390
+ else:
391
+ success, uid = create_user(email, password)
392
+ if success:
393
+ st.success(f"User with UID: {uid} created successfully! You can now log in.")
 
394
  else:
395
+ st.error("User creation failed. Please try again.")
 
 
 
 
396
 
397
  # Log out user
398
  def logout():