How do I fix this login problem?
Muhammad_SJC (4)

I am trying to make a chat room but for that first i need a login menu. I'v coded this so far but i want the usernames and passwords to stay in the code forever, even if i stop and then run the code again. PLs help me.

You are viewing a single comment. View All
ash15khng (304)

The previous 2 comments are about using text files and I'm going to explain why you wouldn't want to do this.
1) repl.it doesn't save generated text files, so if you use your code to generate a file it will get deleted afterwards, which defeats the purpose of it.
2) Even if repl.it does save the files, everyone looking at the repl would be able to see the passwords and everything.

A possible solution would be jsonstore.io, although I have no idea how to use it. (I've heard other replers using it)

mwilki7 (203)

@ash15khng it's saved my text files, and people that i've seen on this site who use text files usually encrypt the data

Muhammad_SJC (4)

@ash15khng Ok i'll ask people how to use jsonstore.io

Muhammad_SJC (4)

@ash15khng i've also heard people saying something about a pickle module

Muhammad_SJC (4)

@mwilki7 how do i look back at the login details and then confirm if its right?
I made a test code and it kinda works.
https://repl.it/@Muhammad_SJC/testing

ash15khng (304)

@mwilki7 Well one time I tried it doesn't save but idk about now.
EDIT: apparently now it does which is cool

ash15khng (304)

@Muhammad_SJC Nice, you just need to encrypt the passwords now (I have no idea how to)