MANIKANDAN A commited on
Commit
e0f7730
·
1 Parent(s): b466286

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -42,7 +42,7 @@ def signup():
42
  return
43
 
44
  role = "user"
45
- hashed_password = bcrypt.hash(new_password)
46
 
47
  try:
48
  with sqlite3.connect("login.db") as conn:
@@ -72,7 +72,7 @@ def login():
72
  cursor.execute("SELECT * FROM users WHERE username = ?", (username,))
73
  user = cursor.fetchone()
74
 
75
- if user and bcrypt.verify(password, user[2]):
76
  st.success("Login successful!")
77
  st.write(f"You are logged in as: {user[1]}")
78
  st.session_state.username = username
 
42
  return
43
 
44
  role = "user"
45
+ hashed_password = new_password
46
 
47
  try:
48
  with sqlite3.connect("login.db") as conn:
 
72
  cursor.execute("SELECT * FROM users WHERE username = ?", (username,))
73
  user = cursor.fetchone()
74
 
75
+ if user and verify(password, user[2]):
76
  st.success("Login successful!")
77
  st.write(f"You are logged in as: {user[1]}")
78
  st.session_state.username = username