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
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
110
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
200
Other Decks in Technology
See All in Technology
『生成AI時代のクレデンシャルとパーミッション設計 — Claude Code を起点に』の執筆企画
takuros
2
2.2k
変化の激しい時代をゴキゲンに生き抜くために 〜ストレスマネジメントのススメ〜
kakehashi
PRO
4
1.1k
AndroidアプリとCopilot Studioの統合
nakasho
0
210
コミュニティ・勉強会を作るのは目的じゃない
ohmori_yusuke
0
290
Anthropic「Long-running a gents」をGeminiで再現してみた
tkikuchi
0
790
多角的な視点から見たAGI
terisuke
0
120
カオナビに Suspenseを導入するまで / The Road to Suspense at kaonavi
kaonavi
1
420
色を視る
yuzneri
0
320
世界の中心でApp Runnerを叫ぶ FINAL
tsukuboshi
0
240
AIの揺らぎに“コシ”を与える階層化品質設計
ickx
0
220
AI와 협업하는 조직으로의 여정
arawn
0
590
Sociotechnical Architecture Reviews: Understanding Teams, not just Artefacts
ewolff
1
130
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Visualization
eitanlees
150
17k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.4k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
BBQ
matthewcrist
89
10k
For a Future-Friendly Web
brad_frost
183
10k
Facilitating Awesome Meetings
lara
57
6.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
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