Understanding JSON Web Token
HTTP is a stateless protocol, and that fact alone implies several important consequences. One of them is that if you want to persist some kind of state between requests, you must resort to a mechanism that will be able to remember a set of data, such as who the logged-in user was, what the selected items during a previous browser session were, or what the site preferences were. In order to achieve such functionality, and identify the current user, you as a developer have numerous options at your disposal. Some of the most popular and modern solutions are the following:
- Credential-based authentication: It requires the user to enter personal credentials, such as a username or email, along with a password
- Passwordless login: Users receive a secure, time-limited token via email or another communication channel for authentication instead of using a traditional password after creating an account. The secure token is used for session authentication...