The general idea is to allow the central auth server to process credentials + generate tokens + policies (policy => this is an application allowed by this user).
First, let's talk about the OAuth server.
i) The server is responsible for the login page in which the user can enter their credentials.
ii) Checks the credentials, if it is correct, this server then checks which client application made the call, and checks whether this application is authorized by this user. - Here we are talking about the concept of areas.
iii) Generates an access / authorization token code for the application.
iv) When an API enters a client with an access token, the API must pass the token to this server itself. This is a server task to verify the contents of a token.
API now
i) The API must accept the token from the client application, transfer it to the server - get the unique identifier of the client from the server and return data to the client for this client.
For third-party applications ,
i) You must have a registration process. The client must have a client identifier and a secret. Google allows you to register with console .
ii) There must be an area that corresponds to each unique API. For example, when you make a Google OAuth application, you need to register your application for the scope - G +, picasa, google drive, etc.
iii) The access token is unique to scope and maps to the permissions granted to your application by the user. If the user client application selects only the G + region and gets access to the user, the application can use the token only for the G + endpoint.
A more detailed answer on how to implement the OAuth server can be found here: How does the efficient OAuth2.0 server / provider work?
divyanshm
source share