The origin of token. Before introducing the principle and advantages of token based authentication, first understand the previous authentication methods. Previous programs identify the requested user and status through the login information stored in the server, which is generally completed by storing session. With the rise of web, application, and mobile end, this way of verification has gradually exposed many problems, especially in scalability. Token based authentication is ubiquitous in the web world. In most Internet companies that use web APIs, tokens are the best way to handle authentication for multiple users. Based on server authentication, we all know that HTTP protocol is stateless, which means that the program needs to verify every request to identify the client.