OAuth (version 1: RFC-5849, version 2: RFC-6749; sometimes incorrectly extended to open authorization) is an open standard for access delegation, commonly used as a way for Internet users to grant websites or applications access to their information on other websites but without giving them the passwords; simplifying secure access. This mechanism is used by companies such as Amazon, Google, Meta Platforms, Microsoft, and X to permit users to share information about their accounts with third-party applications or websites. Generally, the OAuth protocol provides a way for resource owners to provide a client application with secure delegated access to server resources; it specifies a process for resource owners to authorize third-party access to their server resources without providing credentials. Designed specifically to work with Hypertext Transfer Protocol (HTTP), OAuth essentially allows access tokens to be issued to third-party clients by an authorization server, with the approval of the resource owner. The third party then uses the access token to access the protected resources hosted by the resource server.
History
OAuth began in November 2006 when Blaine Cook was developing an OpenID implementation for Twitter. Meanwhile, Larry Halff of the site Ma.gnolia needed a solution to allow its members with OpenIDs to authorize Mac OS X Dashboard widgets to access their service. Cook, Chris Messina and Larry Halff from Magnolia met with David Recordon to discuss using OpenID with the Twitter and Magnolia APIs to delegate authentication. They concluded that there were no open standards or APIs for access management. The OAuth implementer group was established in April 2007 to draft a proposal for an open protocol. DeWitt Clinton from Google became aware of this project and sought to support the initiative. In July 2007, the team drafted the initial specification. Eran Hammer joined the group and coordinated various contributions to OAuth, resulting in a more formal specification. On October 3, 2007, OAuth Core 1.0 was released. In November 2008, at the 73rd Internet Engineering Task Force (IETF) meeting in Minneapolis, an OAuth BoF included the protocol in the IETF for standardization work. There was wide support for chartering a working group within the IETF. The OAuth 1.0 protocol was published as RFC 5849, an informational Request for Comments, in April 2010. Since 31 August 2010, all third party Twitter applications have been required to use OAuth.. The OAuth 2.0 framework was published considering additional use cases and extensibility requirements gathered from the wider IETF community. Albeit being built on the OAuth 1.0 deployment experience, OAuth 2.0 is not backwards compatible with OAuth 1.0. OAuth 2.0 was published as RFC 6749, and RFC 6750 defines how version 2 uses access tokens, both standards track Requests for Comments, in October 2012. As of November 2024, the OAuth 2.1 Authorization Framework draft is a work in progress. It consolidates the functionality in RFCs OAuth 2.0, OAuth 2.0 for Native Apps, Proof Key for Code Exchange, OAuth 2.0 for Browser-Based Apps, OAuth Security Best Current, and Bearer Token Usage.
Security issues
OAuth 1.0 On 23 April 2009, a session fixation security flaw in the 1.0 protocol was announced. It affects the OAuth authorization flow (also known as "3-legged OAuth") in OAuth Core 1.0 Section 6. Version 1.0a of the OAuth Core protocol was issued to address this issue.
OAuth 2.0 In January 2013, the Internet Engineering Task Force published a threat model for OAuth 2.0 in RFC 6819. Among the threats outlined is one called "Open Redirector"; in early 2014, a variant of this was described under the name "Covert Redirect" by Wang Jing. OAuth 2.0 has been analyzed using formal web protocol analysis. This analysis revealed that in setups with multiple authorization servers, one of which is behaving maliciously, clients can become confused about the authorization server to use and may forward secrets to the malicious authorization server (AS Mix-Up Attack). This prompted the creation of a new best current practice internet draft that sets out to define a new security standard for OAuth 2.0. Assuming a fix against the AS Mix-Up Attack in place, the security of OAuth 2.0 has been proven under strong attacker models using formal analysis. One implementation of OAuth 2.0 with numerous security flaws has been exposed. In April and May 2017, about one million users of Gmail (less than 0.1% of users as of May 2017) were targeted by an OAuth-based phishing attack, receiving an email purporting to be from a colleague, employer or friend wanting to share a document on Google Docs. Those who clicked on the link within the email were directed to sign in and allow a potentially malicious third-party program called "Google Apps" to access their "email account, contacts and online documents". Within "approximately one hour", the phishing attack was stopped by Google, who advised those who had given "Google Apps" access to their email to revoke such access and change their passwords. The PKCE (RFC 7636) extension for native apps has been recommended for all types of OAuth clients, including web applications and other confidential clients, in the draft of OAuth 2.1. This is to prevent malicious browser extensions from performing OAuth 2.0 code injection attacks.
Types An access token is provided through the granting of "authorization grant" or "authorization flow". The OAuth framework specifies several grant types for different use cases. Some of the most common OAuth grant types are:
Authorization Code Proof Key for Code Exchange (PKCE) Client Credentials Device Code Refresh Token Resource Owner Password Credentials (ROPC)
… excerpt ends here. Continue reading the full article.



