100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Programming

What Is OAuth 2.0?

A plain-English introduction to OAuth 2.0 as a delegated authorization framework, covering why it replaced password sharing and how tokens and scopes work.

FoundationsBeginner8 min readJul 10, 2026
Analogies

What Is OAuth 2.0?

OAuth 2.0 is an authorization framework, defined in RFC 6749, that lets a third-party application obtain limited access to a user's resources hosted on another service (like Google Drive or GitHub) without the user handing over their username and password directly to that third-party app. Instead, the user grants specific, scoped permissions through the service that owns the data, and the third party receives a token it can present to prove it was granted that access.

🏏

Cricket analogy: Think of a franchise like Mumbai Indians issuing a specific accreditation pass to a broadcast crew instead of handing them the team dressing-room key — the pass lets the crew film practice sessions without giving them access to team strategy meetings.

Why OAuth 2.0 Replaced the Password-Sharing Model

Before OAuth became standard, integrating two services meant the classic 'password anti-pattern': you typed your Gmail or Twitter password directly into a third-party app so it could act on your behalf. That approach had no way to limit what the app could do, no way to revoke access without changing your password everywhere it was reused, and it trained users to hand out credentials to any app that asked — a habit phishers exploited relentlessly. OAuth 2.0, finalized in 2012, replaced this with delegated, revocable, scoped tokens issued by the service itself.

🏏

Cricket analogy: This mirrors why cricket boards stopped letting outside commentary teams use the groundstaff's master gate key — now they use match-day credentials that can be deactivated after a single Test without changing every lock at the stadium.

http
# Simplified OAuth 2.0 exchange (authorization code grant)

# 1. Client redirects the user's browser to the authorization server
GET /authorize?response_type=code
    &client_id=photo_app_123
    &redirect_uri=https://photoapp.example.com/callback
    &scope=photos.readonly
    &state=xyz789 HTTP/1.1
Host: auth.example.com

# 2. After the user approves, the browser is redirected back with a code
HTTP/1.1 302 Found
Location: https://photoapp.example.com/callback?code=SplxlOBeZQQYbYS6WxSbIA&state=xyz789

# 3. The client exchanges the code for an access token (server-to-server)
POST /token HTTP/1.1
Host: auth.example.com
Content-Type: application/x-www-form-urlencoded

grant_type=authorization_code
&code=SplxlOBeZQQYbYS6WxSbIA
&redirect_uri=https://photoapp.example.com/callback
&client_id=photo_app_123
&client_secret=SECRET_VALUE

# 4. Authorization server responds with tokens
HTTP/1.1 200 OK
Content-Type: application/json

{
  "access_token": "eyJhbGciOi...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "tGzv3JOkF0XG5Qx2TlKWIA",
  "scope": "photos.readonly"
}

Access Tokens, Scopes, and Expiration

The core artifact OAuth issues is the access token — an opaque or JWT-formatted string the client presents to a resource server, usually in an Authorization: Bearer <token> header. Each token is minted with one or more scopes, such as repo:read or photos.readonly, which the authorization server records and the resource server enforces; the resource server rejects any request for data outside the token's granted scopes, even if the token itself is otherwise valid and unexpired.

🏏

Cricket analogy: A Bearer token with scope highlights:read is like a broadcaster's pass stamped 'Boundary Camera Access Only' — valid for the whole match, but the security guard at the dressing-room door still turns you away because that scope isn't printed on your pass.

Access tokens are deliberately short-lived, often expiring in 15 minutes to an hour, to limit the damage if one leaks. To avoid forcing the user to re-authenticate constantly, the authorization server also issues a longer-lived refresh token that the client stores securely and exchanges for a fresh access token when the old one expires — without the user seeing a login screen again. If a refresh token is compromised, the authorization server can revoke it, immediately cutting off future access token renewals.

🏏

Cricket analogy: Like a day-pass to a stadium that expires at stumps each day, but a season-ticket holder has a renewable membership card that reissues a fresh day-pass every morning without queuing at the box office again.

OAuth 2.0 itself only defines authorization — proving what an app is allowed to do. It says nothing about verifying who the human user is; that's what OpenID Connect, a layer built on top of OAuth 2.0, adds via the ID token.

OAuth 2.0 vs OAuth 1.0a

OAuth 1.0a, published in 2010, required clients to cryptographically sign every request using HMAC-SHA1 and a shared secret, which made client implementation notoriously fiddly and error-prone. OAuth 2.0 dropped mandatory request signing in favor of relying on TLS (HTTPS) to protect tokens in transit, which simplified client libraries dramatically but shifted the security burden onto always using HTTPS and short-lived tokens. This tradeoff is why OAuth 2.0 is not backward-compatible with OAuth 1.0a — they are different protocols that happen to share a name.

🏏

Cricket analogy: Like the switch from manually verifying a scorer's handwritten signature on every over's scorecard to trusting the stadium's secure digital scoring feed over an encrypted line — faster, but only safe if the connection itself is genuinely secure.

OAuth 2.0 provides no security at all if used over plain HTTP — tokens sent unencrypted can be captured by anyone on the network. Always use HTTPS, and for public clients (mobile apps, SPAs), always use PKCE (RFC 7636) since they can't safely store a client secret.

  • OAuth 2.0 (RFC 6749) is an authorization framework, not a login mechanism — it grants scoped, delegated access to resources.
  • Clients receive access tokens, typically sent as Authorization: Bearer <token> headers, instead of the user's password.
  • Scopes limit exactly what an access token can do, and the resource server enforces those limits server-side.
  • Access tokens are short-lived; refresh tokens let clients get new access tokens without repeated user logins.
  • OAuth 2.0 replaced OAuth 1.0a's mandatory request signing with reliance on TLS, simplifying clients but requiring HTTPS everywhere.
  • OAuth 2.0 alone doesn't verify user identity — that's the job of OpenID Connect, built on top of it.

Practice what you learned

Was this page helpful?

Topics covered

#Programming#OAuth20StudyNotes#WhatIsOAuth20#OAuth#Replaced#Password#Sharing#StudyNotes#SkillVeris#ExamPrep

Frequently Asked Questions

21 categories · pick one to explore

Where can I get free study notes for programming and tech subjects?
SkillVeris offers completely free study notes covering programming and tech subjects, with no signup fees or paywalls. The notes are structured by course and topic, written for quick understanding, and enriched with the Learn Through Hobbies analogy method, so you can revise concepts through cricket, music, gaming, cooking and more.
Are SkillVeris study notes good for exam revision?
Yes, the study notes are designed for efficient revision: each topic answers its heading immediately, keeps explanations concise, and links to related glossary terms and cheat sheets. Students preparing for university exams or certification tests use them as quick revision notes because they distil concepts without the padding of full textbooks.
What subjects do the free study notes cover?
The study notes span the platform's main domains, including AI and machine learning, Python and programming, web development, DevOps, cloud, security and databases. Coverage mirrors the 37 live courses, so notes exist for the topics you are actually studying, and new note sets are added as courses launch.
How are SkillVeris study notes different from regular textbooks?
The notes are answer-first, concise and free, whereas textbooks are long and often expensive. Each section explains one concept directly, then reinforces it through selectable hobby analogies like cricket or cooking. Notes also cross-link to the glossary, blog and cheat sheets, letting you jump to related material instantly instead of flipping pages.
Can I use the developer study material without creating an account?
The study notes are free to access, and SkillVeris does not charge anything for its developer study material at any point. Browsing notes is straightforward from the Study Notes section, and if you want progress tracking, certificates and AI Mentor conversations tied to your learning, a free account unlocks those extras.
Do the study notes explain concepts with analogies?
Yes, this is a signature SkillVeris feature. Study notes use the Learn Through Hobbies method, explaining technical concepts through analogies from twelve domains including cricket, music, gaming, photography, travel, movies, fitness, chess, cooking, finance, business and sports. You can switch the analogy domain instantly to whichever hobby makes the concept click.
Are the revision notes suitable for last-minute exam preparation?
Yes, revision notes on SkillVeris work well for last-minute preparation because every section states the answer in its first sentences, so skimming is genuinely effective. Pair them with the relevant cheat sheet for formulas and syntax, and use the glossary for any unfamiliar term you meet while cramming.
Is there free study material for AI and machine learning?
Yes, SkillVeris provides free study notes across its AI and ML catalogue, covering Python for AI, deep learning frameworks like PyTorch and TensorFlow, Hugging Face Transformers, Large Language Models, RAG, AI agents and MLOps. All of it is free, making it a strong resource for Indian students and global learners alike.
Can beginners understand the study notes, or are they for experts?
Beginners can absolutely use them. The notes are written in plain language, define terms as they appear, and lean on hobby analogies to make abstract ideas concrete. Difficulty scales with the underlying course level, so beginner-course notes stay gentle while advanced-course notes go deeper, and the glossary supports you throughout.
How do study notes connect with SkillVeris courses?
Study notes are organised by course and topic, so they map directly to the structured courses and their 24–40-lesson curriculum. Many learners study a lesson first, then use the matching notes for revision before module assessments and the final exam, where 80 percent is required to pass and earn the certificate.
Are there study notes for Python specifically?
Yes, Python is well covered through notes tied to the Python-focused courses, including Python for AI and ML. Topics span fundamentals through applied machine learning usage. You can reinforce the notes with Python practice in Code Lab, which runs code in your browser with no installation required.
Do the study notes include code examples?
Yes, study notes include code examples wherever a concept is best shown in code, alongside explanations, key points and analogies. Reading a snippet in the notes and then reproducing it yourself in Code Lab is an effective loop, since Code Lab lets you run code in the browser across six languages.
How often is new study material added to SkillVeris?
Study material grows alongside the course catalogue. Whenever new courses join the platform's 37 live courses, matching study notes, glossary entries and cheat sheets are added so the resources stay in sync. Existing notes are also refined over time, so it is worth revisiting topics you studied earlier.
Can I use SkillVeris notes to prepare for technical interviews?
Yes, the notes make excellent interview revision because they compress each concept into direct, answer-first explanations, which mirrors how you should answer interview questions. Combine them with the SkillVeris interview questions feature, which includes readiness scoring, to test whether your revision has actually made you interview-ready.
Are the study notes mobile-friendly for studying on the go?
Yes, the study notes are built to load fast and read comfortably on mobile devices, so you can revise during a commute or between classes. Sections are short and answer-first, which suits small screens, and analogy switching works on mobile too, letting you study anywhere without carrying books.
What is the difference between study notes and cheat sheets?
Study notes explain concepts in depth with context, examples and analogies, making them ideal for learning and revision. Cheat sheets are compact quick-reference summaries of syntax, commands and key facts, ideal once you already understand a topic. Most learners study the notes first, then keep the cheat sheet handy while coding.
Do study notes help if I am stuck on a course lesson?
Yes, reading the matching study notes often clarifies a lesson because the same concept is explained from a different angle, frequently with a different analogy. If you are still stuck, ask the AI Mentor, which answers 24/7 at Quick, Detailed or Deep-dive depth until the idea genuinely makes sense.
Is there free study material for DevOps and cloud topics?
Yes, SkillVeris carries free study notes for DevOps and cloud topics as part of its coverage across 37 live courses. The material suits learners following the DevOps Engineer or Cloud Engineer paths, and it links to related glossary terms and cheat sheets so you can revise the whole toolchain in one place.
Can school or college students in India use these notes for projects?
Yes, students across India and worldwide use SkillVeris notes for coursework, projects and exam preparation, and everything is free, which matters for student budgets. The notes explain concepts clearly enough to cite in project reports, and Code Lab lets you prototype the project code directly in your browser.
How should I combine study notes with other SkillVeris resources?
A proven loop: learn from a course lesson, revise with the matching study notes, look up unfamiliar terms in the glossary, keep the cheat sheet open while practising in Code Lab, and quiz yourself with interview questions. The AI Mentor fills any remaining gaps 24/7, at whatever depth you need.

What Learners Say

Real journeys from the SkillVeris community — swipe for more.

SkillVeris taught me Python through Cricket. Now I’m building real projects and feeling confident!
Arjun S. · B.Tech Student
The best platform for hobby-based learning. Concepts finally stick.
Priya R. · Data Analyst
I went from zero coding to a portfolio of projects — all by learning through my love for gaming. Landed my first internship!
Kabir M. · CS Undergraduate
Trending Topics50 popular tags — tap to explore
Trending CoursesAll 37 free courses — tap to browse