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
Matthew Rudy Jacobs
January 15, 2014
Technology
6
850
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
93
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
非情報系研究者へ送る Transformer入門
rishiyama
11
7.2k
Google系サービスで文字起こしから勝手にカレンダーを埋めるエージェントを作った話
risatube
0
140
「Blue Team Labs Online」入門 - みんなで挑むログ解析バトル
v_avenger
0
150
Scrumは歪む — 組織設計の原理原則
dashi
0
130
Oracle Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
4
1.2k
JAWSDAYS2026_A-6_現場SEが語る 回せるセキュリティ運用~設計で可視化、AIで加速する「楽に回る」運用設計のコツ~
shoki_hata
0
3k
AWS DevOps Agent vs SRE俺 / AWS DevOps Agent vs me, the SRE
sms_tech
3
540
マルチアカウント環境でSecurity Hubの運用!導入の苦労とポイント / JAWS DAYS 2026
genda
0
500
プロジェクトマネジメントをチームに宿す -ゼロからはじめるチームプロジェクトマネジメントは活動1年未満のチームの教科書です- / 20260304 Shigeki Morizane
shift_evolve
PRO
1
250
[JAWSDAYS2026]Who is responsible for IAM
mizukibbb
0
450
脳内メモリ、思ったより揮発性だった
koutorino
0
220
オレ達はAWS管理をやりたいんじゃない!開発の生産性を爆アゲしたいんだ!!
wkm2
4
500
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
150
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
69
Into the Great Unknown - MozCon
thekraken
40
2.3k
The Pragmatic Product Professional
lauravandoore
37
7.2k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
380
Measuring & Analyzing Core Web Vitals
bluesmoon
9
780
Ruling the World: When Life Gets Gamed
codingconduct
0
170
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
470
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
540
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
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