I want to have an auto login option check for a user. Basically that means a cookie will be stored on the client side.
Now the question is, how do I make it secure s
The way I have previously done this is storing the MD5 hash of the password not the actual password.
On the server side you need to check if the login is coming from a cookie and then check if the hash is the same as the password in your database after its been hashed through MD5
That way if someone hacks the users computer they can never know the value of the password however the can still use that cookie to authenticate to only your server.
You can make this more secure by making the cookie expire after x days so if the cookie is stolen the theif can only get access for that period.
At the end of the day the most and only? secure method is make the user login each time