search

Home  >  Q&A  >  body text

javascript - How is the verification login of the mobile e-commerce website implemented?

  1. For example, if you go to buy something without logging in, you will be prompted to log in first. Many pages require verification of login before operation? How is it achieved? Background interception?

伊谢尔伦伊谢尔伦2712 days ago679

reply all(3)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-26 10:57:25

    Only the backend can maintain login status and status verification.
    How to do it? Some use cookies or tokens. The principle is based on session control detection

    reply
    0
  • 習慣沉默

    習慣沉默2017-06-26 10:57:25

    Request interface, if the interface returns 401, the front end will jump to the login page

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-06-26 10:57:25

    What are the pros and cons of using session instead of token in api?

    1. This is something that this community has asked before, I hope it will be helpful to you!

    reply
    0
  • Cancelreply