Web authentication state - Session vs Cookie?

后端 未结 5 1429
鱼传尺愫
鱼传尺愫 2020-12-02 17:09

What\'s the best way to authenticate and track user authentication state from page to page? Some say session state, some say cookies?

Could I just use a session var

5条回答
  •  生来不讨喜
    2020-12-02 17:49

    Cookies and Sessions by themselves are not truly sufficient. They are tools to use to track the user and what they do, but you really need to think about using a database to persist information about the user that can also be used to secure the application.

提交回复
热议问题