Stay Logged In Best Practices: How does a username in the cookie make it more secure?

后端 未结 2 1374
暗喜
暗喜 2021-02-08 11:25

This is a branch of another question: What is the best way to implement "remember me" for a website?

The top answer is to implement this: http://jaspan.com/imp

2条回答
  •  深忆病人
    2021-02-08 11:56

    The username and number are looked up as a pair on the server before issuing a new session cookie. Without the username it would be less secure (could replay using a different user if you stole the number) and harder to lookup.

提交回复
热议问题