OAuth 2 Explained In Simple Terms

ByteByteGo · Beginner ·🏗️ Systems Design & Architecture ·3y ago

Key Takeaways

OAuth 2 explained in simple terms for system design

Full Transcript

[Music] have you ever tried wrapping your mind around o off2 but ended up lost in the sea of jargons that's why we're here today we're breaking down these complex Concepts into digestible explanations let's Dive Right In imagine the early days of the internet sharing info was straightforward just hand over your username and password to another service and they could access anything they wanted this practice is fry upon these days but we might still encounter this practice in certain personal finance software to scrape information from crusto Banks luckily we have something much better these days enter OA 2 OA 2 is like giving someone a special key this key allows them to access specific information in another application we control who gets access to our data without having to share a password and yes we can revoke that key at any time now let's play this out with an example consider a photo storage application Snap Store we've been using it to store our photos and now we want to print some of them using a thirdparty printing service PR magic instead of manually uploading each photo to PR magic we ask PR magic to do the job with a simple click we Grant PR magic permission to access our photos on Snap Store using o Off 2 preager can then access our Snap Store photos on our behalf without ever knowing our Snap Store login credentials this is an example of the O off flow is an elegant stance between us Prem magic and snap store all orchestrated by o of2 now let's unpack this further in this context we are the resource owner because we own our photos on Snap Store Snap Store is the resource server that stores our photos pre magic is the client that wants to access the photos the authorization server could be a part of snap store or an external identity provider and is responsible for handling the O off2 process let's follow the oof2 flow in this scenario it begins when we instruct pre magic to fetch photos from Snap Store pre magic sends a client ID and scope which represent the access level requested to snap store's authorization server as a resource owner we authenticate directly with SNAP store and Grant Prem magic the consent to access our photos once consent is granted the authorization server sends an authorization code back to PR magic Prim magic then presents this authorization code is client ID and client secret to the authorization server now the client secret is a private key shared only between PR magic and the authorization server if the authorization server verifies the authorization code client ID and client secret IT issues an access token to PR magic finally Prim magic uses this access token to request our photos from snap store's resource server this all off to process ensures that our Snap Store login credentials are never exposed to pre magic while allowing pre magic to access only the photos we authorized it to see it's also important to note that the access token can be set to expire after a certain time or can be revoked by us at any point providing an additional layer of security oa2 also support refresh tokens which can be used to obtain a new access token when the o one expires without requiring our in ition that's o off to in a nutshell is an essential piece of the web security infrastructure and the backbone of many secure Seamless app interactions we use daily if you like our videos you may like our system design newsletter as well it covers topics and Trends in large scale system design trusted by 400,000 readers subscribe that blog. byby go.com

Original Description

Get a Free System Design PDF with 158 pages by subscribing to our weekly newsletter: https://bytebytego.ck.page/subscribe Animation tools: Adobe Illustrator and After Effects. Checkout our bestselling System Design Interview books: Volume 1: https://amzn.to/3Ou7gkd Volume 2: https://amzn.to/3HqGozy The digital version of System Design Interview books: https://bit.ly/3mlDSk9 ABOUT US: Covering topics and trends in large-scale system design, from the authors of the best-selling System Design Interview series.
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from ByteByteGo · ByteByteGo · 51 of 60

1 What happens when you type a URL into your browser?
What happens when you type a URL into your browser?
ByteByteGo
2 System Design: Why is Kafka fast?
System Design: Why is Kafka fast?
ByteByteGo
3 System Design: How to store passwords in the database?
System Design: How to store passwords in the database?
ByteByteGo
4 Big Misconceptions about Bare Metal, Virtual Machines, and Containers
Big Misconceptions about Bare Metal, Virtual Machines, and Containers
ByteByteGo
5 FAANG System Design Interview: Design A Location Based Service (Yelp, Google Places)
FAANG System Design Interview: Design A Location Based Service (Yelp, Google Places)
ByteByteGo
6 Scan To Pay in 2 Minutes
Scan To Pay in 2 Minutes
ByteByteGo
7 Consistent Hashing | Algorithms You Should Know #1
Consistent Hashing | Algorithms You Should Know #1
ByteByteGo
8 System Design: Why is single-threaded Redis so fast?
System Design: Why is single-threaded Redis so fast?
ByteByteGo
9 HTTP/1 to HTTP/2 to HTTP/3
HTTP/1 to HTTP/2 to HTTP/3
ByteByteGo
10 What Is REST API? Examples And How To Use It: Crash Course System Design #3
What Is REST API? Examples And How To Use It: Crash Course System Design #3
ByteByteGo
11 The Secret Sauce Behind NoSQL: LSM Tree
The Secret Sauce Behind NoSQL: LSM Tree
ByteByteGo
12 Bloom Filters | Algorithms You Should Know #2 | Real-world Examples
Bloom Filters | Algorithms You Should Know #2 | Real-world Examples
ByteByteGo
13 Back-Of-The-Envelope Estimation / Capacity Planning
Back-Of-The-Envelope Estimation / Capacity Planning
ByteByteGo
14 How To Choose The Right Database?
How To Choose The Right Database?
ByteByteGo
15 How Does Live Streaming Platform Work? (YouTube live, Twitch, TikTok Live)
How Does Live Streaming Platform Work? (YouTube live, Twitch, TikTok Live)
ByteByteGo
16 Latency Numbers Programmer Should Know: Crash Course System Design #1
Latency Numbers Programmer Should Know: Crash Course System Design #1
ByteByteGo
17 What Are Microservices Really All About? (And When Not To Use It)
What Are Microservices Really All About? (And When Not To Use It)
ByteByteGo
18 How Does Apple/Google Pay Work?
How Does Apple/Google Pay Work?
ByteByteGo
19 Proxy vs Reverse Proxy (Real-world Examples)
Proxy vs Reverse Proxy (Real-world Examples)
ByteByteGo
20 What is API Gateway?
What is API Gateway?
ByteByteGo
21 What Is GraphQL? REST vs. GraphQL
What Is GraphQL? REST vs. GraphQL
ByteByteGo
22 What Is Single Sign-on (SSO)? How It Works
What Is Single Sign-on (SSO)? How It Works
ByteByteGo
23 What Is A CDN? How Does It Work?
What Is A CDN? How Does It Work?
ByteByteGo
24 What is RPC? gRPC Introduction.
What is RPC? gRPC Introduction.
ByteByteGo
25 SSL, TLS, HTTPS Explained
SSL, TLS, HTTPS Explained
ByteByteGo
26 FANG Interview Question | Process vs Thread
FANG Interview Question | Process vs Thread
ByteByteGo
27 What is OSI Model | Real World Examples
What is OSI Model | Real World Examples
ByteByteGo
28 CAP Theorem Simplified
CAP Theorem Simplified
ByteByteGo
29 Kubernetes Explained in 6 Minutes | k8s Architecture
Kubernetes Explained in 6 Minutes | k8s Architecture
ByteByteGo
30 CI/CD In 5 Minutes | Is It Worth The Hassle: Crash Course System Design #2
CI/CD In 5 Minutes | Is It Worth The Hassle: Crash Course System Design #2
ByteByteGo
31 Why Is System Design Interview Important?
Why Is System Design Interview Important?
ByteByteGo
32 8 Key Data Structures That Power Modern Databases
8 Key Data Structures That Power Modern Databases
ByteByteGo
33 System Design Interview: A Step-By-Step Guide
System Design Interview: A Step-By-Step Guide
ByteByteGo
34 Top 5 Redis Use Cases
Top 5 Redis Use Cases
ByteByteGo
35 Debugging Like A Pro
Debugging Like A Pro
ByteByteGo
36 But What Is Cloud Native Really All About?
But What Is Cloud Native Really All About?
ByteByteGo
37 Everything You Need to Know About DNS: Crash Course System Design #4
Everything You Need to Know About DNS: Crash Course System Design #4
ByteByteGo
38 The Most Beloved Burger for Developers
The Most Beloved Burger for Developers
ByteByteGo
39 10+ Key Memory & Storage Systems: Crash Course System Design #5
10+ Key Memory & Storage Systems: Crash Course System Design #5
ByteByteGo
40 Cache Systems Every Developer Should Know
Cache Systems Every Developer Should Know
ByteByteGo
41 Top 7 ChatGPT Developer Hacks
Top 7 ChatGPT Developer Hacks
ByteByteGo
42 How ChatGPT Works Technically | ChatGPT Architecture
How ChatGPT Works Technically | ChatGPT Architecture
ByteByteGo
43 10 Key Data Structures We Use Every Day
10 Key Data Structures We Use Every Day
ByteByteGo
44 Top 7 Most-Used Distributed System Patterns
Top 7 Most-Used Distributed System Patterns
ByteByteGo
45 Secret To Optimizing SQL Queries - Understand The SQL Execution Order
Secret To Optimizing SQL Queries - Understand The SQL Execution Order
ByteByteGo
46 Amazon Prime Video Ditches AWS Serverless, Saves 90%
Amazon Prime Video Ditches AWS Serverless, Saves 90%
ByteByteGo
47 Top 6 Most Popular API Architecture Styles
Top 6 Most Popular API Architecture Styles
ByteByteGo
48 Top 5 Most-Used Deployment Strategies
Top 5 Most-Used Deployment Strategies
ByteByteGo
49 How Discord Stores TRILLIONS of Messages
How Discord Stores TRILLIONS of Messages
ByteByteGo
50 Uncovering Stack Overflow's Shocking Architecture
Uncovering Stack Overflow's Shocking Architecture
ByteByteGo
OAuth 2 Explained In Simple Terms
OAuth 2 Explained In Simple Terms
ByteByteGo
52 Demystifying the Unusual Evolution of the Netflix API Architecture
Demystifying the Unusual Evolution of the Netflix API Architecture
ByteByteGo
53 1 Year Of YouTube | Best System Design Series
1 Year Of YouTube | Best System Design Series
ByteByteGo
54 DevOps vs SRE vs Platform Engineering | Clear Big Misconceptions
DevOps vs SRE vs Platform Engineering | Clear Big Misconceptions
ByteByteGo
55 Top 7 Ways to 10x Your API Performance
Top 7 Ways to 10x Your API Performance
ByteByteGo
56 Why Google and Meta Put Billion Lines of Code In 1 Repository?
Why Google and Meta Put Billion Lines of Code In 1 Repository?
ByteByteGo
57 Git MERGE vs REBASE: Everything You Need to Know
Git MERGE vs REBASE: Everything You Need to Know
ByteByteGo
58 Top 6 Load Balancing Algorithms Every Developer Should Know
Top 6 Load Balancing Algorithms Every Developer Should Know
ByteByteGo
59 Algorithms You Should Know Before System Design Interviews
Algorithms You Should Know Before System Design Interviews
ByteByteGo
60 Top 5 Most Used Architecture Patterns
Top 5 Most Used Architecture Patterns
ByteByteGo

Related Reads

📰
Beyond the Hype: How to Actually Maximize Cursor for High-Performance Vibe Coding
Maximize cursor performance for high-performance vibe coding by adopting architectural supervision and intentional coding practices
Dev.to · Bishal Deb Roy
📰
I Bookmarked 30+ GitHub Repos for System Design: Here Are the 10 You Actually Need in 2026
Discover the top 10 GitHub repositories for system design interviews in 2026 and improve your skills
Medium · Programming
📰
State Synchronization at the Edge: Implementing Distributed Key-Value Stores for High-Volume Application Dashboards
Learn to implement distributed key-value stores for high-volume application dashboards using state synchronization at the edge
Dev.to · AI Expert
📰
Knowledge Is Not a Store: Why Every Container Died and Every Loop Survived
Learn why containers died and loops survived in a research series on building adjacent systems
Dev.to · Oleksander
Up next
8. Steps in Supply Chain Management from Logistics & Supply Chain Management Subject
Devika's Commerce & Management Academy
Watch →