Secure way to handle frontend login

前端 未结 2 2108
一生所求
一生所求 2021-01-14 13:29

A few questions came across my mind about how to secure a login page (Web).

When I build a demo app for instance a web-application with VueJS or just really blank u

2条回答
  •  伪装坚强ぢ
    2021-01-14 14:23

    You could set a session variable for the current user if the login was succesfull. The session is server-side so it is much trickier to hijack the session key.

    Further, you could set a time stamp and check when the user's last page refresh took place on each page load. If he did not refresh the page for X amount of time, you can unset the session variable and log out the user.

提交回复
热议问题