How do I protect a page only for logged users?

前端 未结 4 1277
南旧
南旧 2020-12-11 02:59

I created a login form that works great. But I realized the page my user is directed to can still be accessed by anybody. How do I protect the page being accessed only vie

4条回答
  •  天命终不由人
    2020-12-11 03:17

    In each page/content with restricted access, you should authenticate the client/user. If people were crazy then you'd have to make the user fill in his details (username/password) in every page, but thanks to "HTTP cookies" - we don't have to do that.

提交回复
热议问题