Is it advisable to store a hashed password in a cookie?

前端 未结 6 1502
夕颜
夕颜 2021-01-04 01:58

I want user\'s to be able to select a \"remember me\" box on my website so they need not log in each time they come. So, I need to store a unique ID in a cookie to identify

6条回答
  •  迷失自我
    2021-01-04 02:07

    There's a low risk with a good algorithm and large salt, but why take any unnecessary risk?

    If you just need to identify the user, then store something that can uniquely identify the user, like a guid along with some other stored verification code (not their password, some random long string). I wouldn't use a guid alone as it would not be a safe method of authentication.

提交回复
热议问题