javascript - How is the verification login of the mobile e-commerce website implemented?
伊谢尔伦2017-06-26 10:55:25
0
3
699
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?
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
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
Request interface, if the interface returns 401, the front end will jump to the login page
What are the pros and cons of using session instead of token in api?
This is something that this community has asked before, I hope it will be helpful to you!