Share your repls and programming experiences

← Back to all posts
Log In System
MikeJMS8910 (234)

This is a login system that is free to use by anyone, but if you do use it please state that in the description of your game. Hopefully you find this helpful, if there are any errors please leave a comment.

-Info-
If you already have an account and make a new account the new account will overwrite the old one.

Please make sure your username and password is correct before leaving a comment

-How it works-
When you run the script, all of the values will be saved to a text file and only your value is there because it creates a brand new file in the code, if there isn't a pre-existing code.

Comments
hotnewtop
JBloves27 (1905)

Wow, very helpful! One suggestion, I think you should add more than one login system, not one. Anyways, I think this may come in handy!

JBloves27 (1905)

@MikeJMS8910 im just gonna fork this, just to experiment with this :)

MikeJMS8910 (234)

@JBYT27 What do you mean one login system?

JBloves27 (1905)

Like more examples of login systems. Not just this one that you created @MikeJMS8910

MikeJMS8910 (234)

@JBYT27 ok, im probably going to update it soon

RayhanADev (2621)

Huh, I tried this earlier today and when I used the same username and password it doesn’t work. Please help!

MikeJMS8910 (234)

@RayhanADev i just tested it and it works, i think im ganna have to update it

Spacecraft (152)

The data files are overwritten on each entry. It appears to be only capable of storing a single user login. Is that what you intended, or were you going for a multi-user system?

MikeJMS8910 (234)

@Spacecraft its one user log in per local account

adl212 (172)

Hi, I would like to know how you saved the username and password in your program without it getting erased when you restarted the program. I find that by using repl and saving things to a text file in the repl, the data doesn't get saved if not used by the owner.

MikeJMS8910 (234)

@adl212 really cause this should have it

adl212 (172)

@MikeJMS8910 Maybe it's the pickle I don't know.

509robotic (6)

@MikeJMS8910 thx! wich language(i'm skilled in python)

MikeJMS8910 (234)

@509robotic I can do pyhton, C#, or html5

509robotic (6)

@MikeJMS8910 good :) im best at pyton too :)
i'll make project and invite u

UCYT5040 (16)

You should also use the replit database instead of pickle

MikeJMS8910 (234)

@JeremiahSaunder thats what I was going to do but I found it easier to learn with pickles

PowerCoder (741)

@JeremiahSaunder He should've used MySQL. Pickle and Repl.it Database are both less scalable and less secure.

MikeJMS8910 (234)

@PowerCoder There are lots of things you can use

UCYT5040 (16)

Instead of
cprint("[1]Make an account", "green", attrs=['bold']) cprint("[2]Log in", "green", attrs=['bold']) print(" ")
please use
cprint("[1]Make an account\n[2]Log in\n", "green", attrs=['bold'])
(sorry code blocks were not working)

MikeJMS8910 (234)

@JeremiahSaunder well the second line is longer than the first. cprint is just how I learned it

UCYT5040 (16)

@MikeJMS8910 what? just replace lines 7,8, and 9 with cprint("[1]Make an account\n[2]Log in\n", "green", attrs=['bold'])

UCYT5040 (16)

@MikeJMS8910 What is the second line lenghth? Im confused

UCYT5040 (16)

@MikeJMS8910 "well the second line is longer than the first. cprint is just how I learned it"

MikeJMS8910 (234)

@JeremiahSaunder Oh yeah, well im trying to switch over, but I was taught colored

UCYT5040 (16)

@MikeJMS8910 Umm the code I gave you was cprint? You really should learn to use \n.

MikeJMS8910 (234)

@JeremiahSaunder I am, im using it in some other codes

UCYT5040 (16)

@MikeJMS8910 this code is very annoyingcprint("[1]Make an account", "green", attrs=['bold']) cprint("[2]Log in", "green", attrs=['bold']) print(" ") Just use \n in it.