Skip to content
Sign upLog in
← Back to Community

Python - User login and sign-up system

Profile icon
dillonjoshua68

How to make a user sign-up and login system in Python 3?

Answered by Muffinlavania [earned 5 cycles]
View Answer
Voters
Profile icon
JoshCross2004
Profile icon
dillonjoshua68
Comments
hotnewtop
Profile icon
Muffinlavania

:D i have a tutorial on this!!here, This uses pickle, it will save data into a file, then you can load it. So you can save the password in a file, then when they are guessing it, load it up and see if they are correct. YOu can make the login thing just by making a new file and putting their info in another file
Tutorial Here!!

Profile icon
dillonjoshua68
Profile icon
dillonjoshua68

Do they have to fork the repl?

@Muffinlavania

Profile icon
Muffinlavania
Profile icon
dillonjoshua68

Ok.... that’s good

@Muffinlavania

Profile icon
adl212

You've seen my post here and it is the one working way that I know of that actually saves, unlike using text or json files to store your data.

Profile icon
[deleted]

password = "bob"
pass_count = 0
while pass_count < 5:
pass_attempt = input("Password: ")
if pass_attempt = password:
print("Password correct!")
break
else:
pass_count = pass_count + 1

I'm thinking something like that should work. Sign up should work the same, just give them an option to create or login. And then ask them for a username and password. Add that to the list of usernames. And when a user puts in their username set the value of password to their corresponding password. I'm not sure how to save items although.

Profile icon
dillonjoshua68
Profile icon
Coder100

Hello. There is an awesome client for the official repl.it DB here by

@Codemonkey51
! Be sure to have explorer mode turned on!

Profile icon
dillonjoshua68

Thanks, but I wanted to find a way to do it without repl.it ‘s DB, but anyways thanks I’ll check it out

@Coder100