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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Matthew Rudy Jacobs
January 15, 2014
Technology
6
860
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
Tweet
Share
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
110
From Developer To Architect
matthewrudy
0
94
Git Commit Signing: Code we can trust?
matthewrudy
0
190
We Need To Talk About Postgres
matthewrudy
0
100
Coding as a Team At GoGoVan
matthewrudy
3
450
10 Years of Code
matthewrudy
0
120
Elixir - Part 1
matthewrudy
1
200
Other Decks in Technology
See All in Technology
The Rise of Browser Automation: AI-Powered Web Interaction in 2026
marcthompson_seo
0
300
Phase01_AI座学_基礎
overflowinc
0
3.4k
既存アプリの延命も,最新技術での新規開発も:WebSphereの最新情報
ktgrryt
0
150
1GB RAMのラズピッピで何ができるのか試してみよう / 20260319-rpijam-1gb-rpi-whats-possible
akkiesoft
0
840
20260320_JaSST26_Tokyo_登壇資料.pdf
mura_shin
0
110
Phase02_AI座学_応用
overflowinc
0
2.5k
How to install a gem
indirect
0
690
JEDAI認定プログラム JEDAI Order 2026 受賞者一覧 / JEDAI Order 2026 Winners
databricksjapan
0
270
AlloyDB 奮闘記
hatappi
0
200
スピンアウト講座05_実践活用事例
overflowinc
0
1k
TypeScript 7.0の現在地と備え方
uhyo
7
2k
_Architecture_Modernization_から学ぶ現状理解から設計への道のり.pdf
satohjohn
2
720
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
3k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
sira's awesome portfolio website redesign presentation
elsirapls
0
200
Build your cross-platform service in a week with App Engine
jlugia
234
18k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
140
Building AI with AI
inesmontani
PRO
1
820
Optimizing for Happiness
mojombo
378
71k
It's Worth the Effort
3n
188
29k
SEO for Brand Visibility & Recognition
aleyda
0
4.4k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
430
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