Token based authentication is a newer approach of authentication in many web applications. In this approach authentication is successful when a user proves the server of their validity by passing the user token, which then is verified by the server. Before getting started with the token-based approach, let's quickly see some benefits of using this approach:
- Stateless
- Mobile-ready
- Performance
- More secure
- Standard based JWT
- There are many other benefits of using the token based approach, such as you can serve all your assets (HTML, CSS, and JS) via CDN and your server side is just an API, which will improve the performance
In a token based approach you first need to get a valid token, which you usually will get ...