When a user sends a request with required parameters like username and password.git
The application checks if username and password are valid. On validation, the application will create a token using a payload and a secret key.github
It will then send the token back to the user to store and send it with each request. When user sends request with this token, application verifies validity with same secret key.web
If the token is valid, the request is served, else the application will send an appropriate error message.json
https://medium.freecodecamp.org/how-to-make-authentication-easier-with-json-web-token-cc15df3f2228app
https://github.com/sudheeshshetty/JWT_Authui