OAuth 2.0 delegates access without requiring an application to receive a user’s password. It limits access by combining an authorization flow, requested scopes, and time-limited access tokens. section 7.3
OAuth authorization flows use four roles and several flow types:
- The resource owner controls the data, the client requests access, the authorization server authenticates users and issues tokens, and the resource server stores data and enforces access. section 7.3
- Authorization code exchanges a code for a token; client credentials obtains tokens directly for programmatic access such as microservices; device authorization supports input-constrained devices; refresh tokens renew expired access. section 7.8
- Scopes specify permitted data and operations, while access tokens carry access for a limited period and within those requested scopes. section 7.3
Importing a LinkedIn profile
A job portal should not ask for LinkedIn credentials, because those credentials could give it unrestricted account access. Instead, the user authorizes limited employment-history access, and the portal receives a scoped, temporary access token. section 7.3
Figure 7.5 OAuth describes flows through which users (resource owners) can authorize applications (clients) to access their data in an API (resource server). Every flow begins with an authorization request, followed by user login and consent and then by an access token grant.
Use the flow diagram to follow authorization request, user login and consent, and access-token grant. section 7.3








