Authentication and authorization with HTTP
The Fake Store API provides an endpoint for authenticating users with a username and a password. It contains a login method that accepts a username and a password as parameters and returns an authentication token. We will use the authentication token in our application to differentiate between a logged-in user and a guest.
The username and password are provided by a predefined pool of users at https://fakestoreapi.com/users.
We will explore the following authentication and authorization topics in this section:
- Authenticating with a backend API
- Authorizing users for certain features
- Authorizing HTTP requests using interceptors