Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ember and OAuth
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Matthew Rudy Jacobs
January 15, 2014
Technology
860
6
Share
Ember and OAuth
A brief tour of OAuth2 and it's use with Ember and other Client-side frameworks
Matthew Rudy Jacobs
January 15, 2014
More Decks by Matthew Rudy Jacobs
See All by Matthew Rudy Jacobs
From Developer to Architect (and back again)
matthewrudy
3
240
Humans are Hard
matthewrudy
0
150
[Alpha] Humans Are Hard
matthewrudy
0
120
From Developer To Architect
matthewrudy
0
100
Git Commit Signing: Code we can trust?
matthewrudy
0
190
We Need To Talk About Postgres
matthewrudy
0
110
Coding as a Team At GoGoVan
matthewrudy
3
460
10 Years of Code
matthewrudy
0
130
Elixir - Part 1
matthewrudy
1
210
Other Decks in Technology
See All in Technology
Claude Code x Accounting
kawaguti
PRO
1
320
形式手法特論:公平性制約の位相的特徴づけ #kernelvm / Kernel VM Study Kansai 12th
ytaka23
0
100
FinJAWS_ECSーRDSProxy
asahihidehiko
0
110
管理アカウント単一運用からAWS Organizationsに移行するの大変で滅
hiramax
0
230
Generative UI × A2UI で AI エージェントを作った話 AI-DLC も使ってみた!
kmiya84377
1
150
DI コンテナ自動生成ツールを実装してみた / intro-autodi
uhzz
0
870
long-running-tasks
cipepser
2
330
AIコーディングエージェントの活用で、コードは静かに肥大化した
yosukeshinoda
1
350
権限管理設計を完全に理解した
rsugi
2
200
The Making of AI Chips
pfn
PRO
0
760
Node.js+TypeScriptにおけるCJS/ESM相互運用の最新ポイント
grainrigi
2
120
『家族アルバム みてね』における インシデント対応との向き合い方 / Approach incident response in Family Album
kohbis
2
180
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Test your architecture with Archunit
thirion
1
2.2k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
WCS-LA-2024
lcolladotor
0
600
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
150
Optimizing for Happiness
mojombo
378
71k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
540
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Transcript
Ember & OAuth Matthew Rudy Jacobs Wednesday 15th January 2014
@ EmberLondon
@matthewrudy
cronycle.com
The Goal
Authenticate via a 3rd party
Obtain access to a 3rd party API
The Tool
OAuth2 http://tools.ietf.org/html/rfc6749
“The Road to Hell”?
Actually it’s alright
4 Different Flows otherwise known as “grant types”
4 Grant Types • Authorization Code • Implicit • Resource
Owner Password Credentials • Client Credentials
Authorization Code
Authorization Code
Authorization Code auth code access token /auth?code=abc123
Implicit
Implicit S3
Implicit S3 access token /auth#access_token=abc123
Password
Password
Password access token { access_token: “abc123” }
Client Credentials
Client Credentials
Implicit Grant Flow this is what we want!
ember-oauth2
None
Initiate the Auth
Sign in with Github
We have a token
Except we don’t!
This is not Implicit!
This is not Implicit! /callback?code=…
This is not Implicit! /callback?code=… /callback#access_token=…
Github doesn’t do Implicit Grant!
Github suggests you use passwords
TLDR; pure client-side OAuth is poorly supported
But what about a hybrid approach?
Authorization Code Flow (as an API) ❤️
Stick Ember in the middle
The Concept
GET /oauths/new {url: “https://github.com/auth?…”} https://github.com/auth?…
GET /oauths/new {url: “https://github.com/auth?…”} https://github.com/auth?… callback POST /oauths {access_token: “abc123”}
GET /oauths/new {url: “https://github.com/auth?…”} https://github.com/auth?… callback POST /oauths {access_token: “abc123”}
Hack it together!
OAuth API Client
Handled in a Route
Easy right?
Thanks
@matthewrudy