ArticleslgStudy

computer science

OAuth

OAuth is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand OAuth rather than just read about it. In short: 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…

OAuth — main illustration
OAuth — illustration

Key takeaways

  • OAuth belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect OAuth to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of OAuth from memory before moving on to harder problems.

Reference excerpt

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.

Illustrations

OAuth: A hypothetical authorization flow where login information is shared with a third-party application. This poses many security risks which can be prevented by the use of OAuth authorization flows.
A hypothetical authorization flow where login information is shared with a third-party application. This poses many security risks which can be prevented by the use of OAuth authorization flows.
OAuth: A high-level overview of OAuth 2.0 flow. The resource owner credentials are used only on the authorization server, but not on the client (e.g. the third-party app).
A high-level overview of OAuth 2.0 flow. The resource owner credentials are used only on the authorization server, but not on the client (e.g. the third-party app).
OAuth illustration

Worked examples

Example 1 — a first encounter with OAuth

Start with the simplest possible case. Write down what OAuth claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to OAuth before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about OAuth ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of OAuth

In research
OAuth appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses OAuth in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
OAuth is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cloud standards, Computer access control, Computer access control protocols, so understanding it makes those chapters shorter.
In everyday life
Look for OAuth outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “OAuth” →

How to study OAuth in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what OAuth means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain OAuth out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is OAuth in simple terms?

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 pas…

Why does OAuth matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study OAuth?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on OAuth.

Tags

  • Cloud standards
  • Computer access control
  • Computer access control protocols
  • Internet properties established in 2007
  • Internet protocols

Keep exploring