OAuth is an open standard for delegated authorization. It lets a user grant an app limited access to their data on another service without sharing their password with that app.

Definition
OAuth, most commonly used today in its 2.0 form, solves a specific problem: how to let one application act on a user’s behalf at another service without handing over the user’s credentials. When you allow a scheduling tool to read your calendar or let an analytics app pull data from your ad account, OAuth is usually what makes that permission possible and revocable.
The key idea is that the user signs in directly with the service that holds their data, approves a specific set of permissions called scopes, and the requesting app receives an access token rather than a password. OAuth is about authorization, deciding what an app may do. Identity, proving who the user is, is handled by OpenID Connect, a layer built on top of OAuth that powers most Sign in with Google or Microsoft buttons.

How it works
OAuth defines four roles: the resource owner, who is the user; the client, which is the app requesting access; the authorization server, which authenticates the user and issues tokens; and the resource server, the API that holds the data. In many products the authorization and resource servers belong to the same provider, but the standard keeps them separate.
The most common flow is the authorization code flow, used with PKCE for mobile apps, single-page apps and, increasingly, all clients. The app redirects the user to the authorization server with the scopes it wants. The user signs in there and approves the request. The authorization server redirects back to the app with a short-lived code, and the app exchanges that code, together with proof that it started the request, for an access token and often a refresh token.
The app then sends the access token with each API request, usually in the Authorization header. Access tokens are short-lived and limited to the approved scopes. When one expires, the app uses the refresh token to get a new one without asking the user again. Other flows exist for specific cases, such as client credentials for server-to-server access and a device flow for TVs and other devices without a keyboard.
Keep learning
Put it into practice
Well-designed APIs and dependable third-party integrations that connect your products, partners and internal systems.
Explore serviceSecurity audits, threat monitoring, incident response and network security delivered as an ongoing, leadership-led managed security program.
Explore serviceFast, secure and accessible web applications built with React and Next.js, designed for real users and real traffic.
Explore serviceFAQ
OAuth is an authorization framework: it grants an app permission to access resources. It does not, on its own, tell the app who the user is in a standardized way. OpenID Connect adds that identity layer on top of OAuth, which is why sign-in features usually rely on both.
Single sign-on is the outcome: one login gives access to several applications. OAuth with OpenID Connect is one of the standard ways to achieve it, especially for modern web and mobile apps. SAML is another common SSO standard, widely used in enterprise environments.
No. The OAuth standard does not require a token format. Some authorization servers issue opaque random strings that the API checks by asking the server, and others issue JSON Web Tokens that the API can validate locally. ID tokens in OpenID Connect, however, are always JWTs.
Talk to a solution architect about where it fits in your roadmap.
