The GiveNTake application allows anonymous users to access and use some of the APIs, such as product search and product display. But other operations, such as sending and reading messages, are only allowed to registered users, which means that users will have to go through an authentication phase where the application will validate their credentials, such as their username and password, and give them the access token in the form of a JWT. Afterwards, the token will be validated with each request and the user details will be extracted.
Adding login functionality to the GiveNTake application is done like this:
- First, let's define the user login input, that is, their email and password, ...