OAuth 2 architecture and basics
OAuth 2 is an authentication framework that is used to create authentication pattern between different systems. In this, the client, instead of making a request to the resource server, makes an initial request for some entity called resource owner. This resource owner gives back the authentication grant for the client (if credentials are successful). The client now sends this authentication grant to another entity called an authentication server. This authentication server takes the grant and returns an access token. This token is the key thing for a client to access API resources. It needs to make an API request to the resource server with this access token and the response is served. In this entire flow, the second part can be done using JWT. Before that, let us learn the difference between authentication and authorization.
Authentication versus authorization
Authentication is the process of identifying whether a client is genuine or not. When a server authenticates...