Course contentsShow
← Web Development
Lesson 1616 of 2,98229. Web Authentication PatternsFree lesson

OAuth Roles and Terminology

Learning the roles of resource owner, client, authorization server, and resource server in OAuth flows.

OAuth Roles and Terminology

You'll learn the four key roles that make OAuth work and what each one does in the authorization process.

What Are OAuth Roles?

OAuth 2.0 defines a choreographed dance between four distinct parties, each with a specific responsibility. Understanding these roles is essential before diving into actual OAuth flows. Think of it like a valet parking scenario: you (the car owner) authorize the valet (an app) to access your car (your data) by getting permission from the parking attendant (authorization server) who controls access to the parking lot (resource server).

The Four OAuth Roles

Resource Owner

This is you — the user who owns the data. You decide whether to grant or deny access to your information. When a third-party app wants to access your Google Photos, you're the resource owner.

Client

The application requesting access to protected resources. This could be a mobile app, web app, or server application. The client must be registered with the authorization server and receives its own credentials (client ID and sometimes a client secret).

Authorization Server

The gatekeeper that authenticates the resource owner and issues access tokens after getting consent. This is where you see the "Allow this app to access your data?" screen. For Google services, this is accounts.google.com.

Resource Server

The API or service hosting the protected data. It accepts access tokens and returns requested resources if the token is valid. For Google Photos, this would be the Photos API server that actually stores and serves your images.

These four roles collaborate to ensure secure, user-consented data access without sharing passwords.

Key Takeaway: OAuth separates concerns into four roles — the resource owner (user) grants permission, the client (app) requests access, the authorization server issues tokens, and the resource server protects and serves the data.