How To Make A Login System?
This question has probably been one of the hardest for me to solve, but I am still stuck as I need a way to save the login data of users to be remembered forever (I know about local storage, but that can be incredibly unreliable as it will just disappear the next time you come back)
LocalStorage is not for logins. Your question is unbelievably complicated. If you look at one my earliest repls, (chat), I implemented a very secure login function.
Steps to make a login:
2. Set up a database: mySQL, MongoDB, SQLite, etc. YOu need this for storing your user information
3. Every time a user signs up, insert the information in the database. Make sure you hash the password. When they login, check for their entry in the database. If it is found, set a session in the user's computer that he is logged in, OR use JWT.
Seriously, creating a login is UNBELIEVABLY complicated.
@nbbcsf good answer. And yes, I must stress it is incredibly complicated. Getting JWT/Sessions to work is time consuming as well as the database. If you want a way to authenticate users, your best bet is to use some external form of authentication like repl_auth, github auth, or google auth.
<TD> <INPUT TYPE="TEXT" NAME="iName" MAXLENGTH="15"> </td> <TD> </td> </tr> <tr> <TD ALIGN="RIGHT"> <p><FONT SIZE="3" FACE="Arial"><B>Password:</B></FONT> </p></TD> <td> <INPUT NAME="iAccID" MAXLENGTH="15" HEIGHT="50"> </TD> <td align="center"> <INPUT TYPE="BUTTON" VALUE=" Login " onClick="Getstats()" HEIGHT="40" WIDTH="50"><BR><br> <INPUT TYPE="RESET" VALUE=" Reset " onClick="window.status=('RESET: Please enter your USERNAME and ACCOUNT ID.')" WIDTH="50"> </td> </TR>
that mighhhhhhhhht work. sorry if u cant read it