The front end uses angularjs to implement single-page applications. If thinkPHP is used as a restapi at the backend, how can we ensure api security? A single-page application is used in the public account. After clicking it, it jumps to this application. If you are not logged on, you only need to use openid to determine whether to register the application. Then some personal emails are involved... the front end uses angularjs to implement single-page applications. If thinkPHP is used as the rest api at the backend, how can we ensure api security?
The single-page application is used in the public account. Click the public account to jump to the application.
OpenidTo determine whether to register, and then some personal information will be involved.
Reply content:
The front end uses angularjs to implement single-page applications. If thinkPHP is used as the rest api at the backend, how can we ensure api security?
The single-page application is used in the public account. Click the public account to jump to the application.OpenidTo determine whether to register, and then some personal information will be involved.
After logging on, generate the token and store it in the browser's sessionStorage. Each time you get the data, send the token and compare it with the server to determine whether to log on, and then obtain the data such as json response.
Please see: https://segmentfault.com/a/1190000004715...