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
コードや知識を組み込む / Incorporate Code and Knowledge
ks91
PRO
0
180
EMから幅を広げるために最近挑戦していること / Recent challenges I'm undertaking to expand my horizons beyond EM
hiro_torii
1
160
AIが自律的に働く時代へ Amazon Quick で実現するAIエージェント紹介
koheiyoshikawa
0
150
小説執筆のハーネスエンジニアリング
yoshitetsu
0
860
Do Vibe Coding ao LLM em Produção para Busca Agêntica - TDC 2026 - Summit IA - São Paulo
jpbonson
3
170
Cortex Codeのコスト見積ヒントご紹介
yokatsuki
0
130
AIでAIをテストする - 音声AIエージェントの品質保証戦略
morix1500
1
150
はじめての MagicPod生成AI機能 機能紹介から活用方法まで
magicpod
0
120
[Oracle TechNight#99] 生成AI時代のAI/ML入門 ~ AIとオラクルデータベースの関係 (前半)
oracle4engineer
PRO
1
120
The 7 pitfalls of AI
ufried
0
110
Hacobu Tech Deck
hacobu
PRO
0
140
Practical TypeProf: Lessons from Analyzing Optcarrot
mame
1
1.5k
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Fireside Chat
paigeccino
42
3.9k
Designing for humans not robots
tammielis
254
26k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
230
Speed Design
sergeychernyshev
33
1.6k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
110
The agentic SEO stack - context over prompts
schlessera
0
760
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
450
How GitHub (no longer) Works
holman
316
150k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
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