OAuth
OAuth is an IETF authorization framework that lets a third-party application obtain limited access to an HTTP service, either on behalf of a resource owner who approves the access or on the application's own behalf.
Updated
Overview
Without OAuth, a resource owner who wants a third-party application to reach their data has to share their credentials with it. The application then stores the password, often in clear text, gains overly broad access, and cannot be cut off without changing the password, which cuts off every other application too. OAuth adds an authorization layer that separates the client from the resource owner: the client obtains an access token, a string denoting a specific scope, lifetime, and other access attributes, instead of using the owner's credentials.
OAuth defines four roles. The resource owner can grant access to a protected resource; the resource server hosts it; the client is the application making requests on the owner's behalf; and the authorization server issues access tokens to the client after authenticating the resource owner and obtaining authorization. RFC 6749 defines four grant types: authorization code, implicit, resource owner password credentials, and client credentials.
OAuth 2.0 was published as RFC 6749 in October 2012. It replaces and obsoletes OAuth 1.0 and is not backward compatible with it. CISA and NSA guidance describes OAuth 2.0 as designed only for authorization, granting access to data and features from one application to another; OpenID Connect is a thin layer on top of OAuth 2.0 that adds login and profile information about the person who is logged in.
RFC 9700, the IETF best current practice for OAuth 2.0 security, updates the original threat model and deprecates modes of operation considered less secure or insecure. The resource owner password credentials grant must not be used, because it exposes the owner's credentials to the client. Clients should not use the implicit grant, which is vulnerable to access token leakage and replay, and public clients must use PKCE to protect the authorization code flow.
Similar Terms
2 termsSAML
SAML exchanges authentication and authorization data between identity providers and service providers, and browser-based SSO is one of its most common uses. OAuth 2.0 is designed only for authorization, granting one application access to data and features of another. Login on top of OAuth comes from OpenID Connect.
SSO
SSO lets one login reach multiple applications. OAuth by itself handles authorization, not login. OpenID Connect adds login and profile information on top of OAuth 2.0, and it is OpenID Connect that enables SSO across applications.
Frequently Asked Questions
Is OAuth authentication or authorization?→
Authorization. CISA and NSA guidance describes OAuth 2.0 as designed only for authorization, granting access to data and features from one application to another. OpenID Connect, a thin layer on top of OAuth 2.0, adds login and profile information.
What is an OAuth access token?→
A string denoting a specific scope, lifetime, and other access attributes. An authorization server issues it to a client with the resource owner's approval, and the client presents it to the resource server to reach the protected resources.
What is the difference between OAuth 1.0 and OAuth 2.0?→
OAuth 2.0, defined in RFC 6749, replaces and obsoletes OAuth 1.0. It is not backward compatible and shares very few implementation details with OAuth 1.0, and RFC 6749 intends new implementations to use OAuth 2.0.
Which OAuth grant types should not be used?→
RFC 9700 says the resource owner password credentials grant must not be used, because it exposes the resource owner's credentials to the client. It also says clients should not use the implicit grant, which is vulnerable to access token leakage and replay, unless those risks are mitigated.
Related
Sources
Definitions follow the government and standards body sources listed above. This site is not affiliated with the agencies or organizations cited.