Login system Using terminal

I made a login system using python terminal that uses local storage to save password
there is a link below if you want to check it out
Repl link
I am think of making one that uses flask and Replit DataBase sometime soon
Please comment any suggestion you have

1 Like

Nice, but I would recommend using the Replit Database or something else because anyone can see anyone’s login details meaning it’s not very secure. :slight_smile:


Yeah good point @MattDESTROYER

1 Like

It’s very good, as @MattDESTROYER said, it’s recommended using a database, like that you provide much more security!

i made a new login system using replit db

from replit import db
def login():
  print("login will return error if login invalid")
  username = input("Username:\t")
  password = input("Password:\t")
  path = username + password
  print("welcome " + db[path])
  return path
def signup():
  print("Create account")
  username = input("Username Not shown:\t")
  password = input("Password Not shown:\t")
  part3 = input("Nickname is shown:\t")
  path = username + password
  db[path] = part3
  print("Account created for " + db[path])
  return path
def delete():
  print("must login to delete account")
  username = input("Username:\t")
  password = input("Password:\t")
  path = username + password
  print("account deleted for " + db[path])
  del db[path]
def change_name():
  print("must login to change nickname")
  username = input("Username:\t")
  password = input("Password:\t")
  nickname = input("What is your new nickname:\t")
  path = username + password
  print("nickname changed from " + db[path] + " to " + nickname)
  del db[path]
  db[path] = nickname
  return nickname
choice = input("""
1 = Login
2 = Signup
3 = Delete account
4 = change nickname
if choice == "1":
  path = login()
elif choice == "2":
  path = signup()
elif choice == "3":
elif choice == "4":
  nickame = change_name()
  print("invalid entry options are 1,2,3 and 4")