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
RoR talking to Salesforce using OAuth
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Bruno Fagundez
June 11, 2015
Programming
85
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
RoR talking to Salesforce using OAuth
How to connect your RoR app to Salesforce using restforce and omniauth-salesforce gems.
Bruno Fagundez
June 11, 2015
More Decks by Bruno Fagundez
See All by Bruno Fagundez
SF1 and the Internet of Things
bfagundez
0
250
Using Python on Heroku and Force.com Canvas to Enhance Salesforce.com
bfagundez
2
630
Other Decks in Programming
See All in Programming
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
450
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
120
Press start. Python's next generation.
willingc
PRO
2
110
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
470
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
AI Engineeringは、AIプロダクトだけのものか? 〜AIがソフトウェアを作る時代の新しい当たり前〜 / No AI in your product. AI Engineering in your development.
rkaga
5
510
React本体のコードリーディング
high_g_engineer
1
150
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
350
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
500
Cloudflare is Agents
chimame
0
180
MySQLとPostgreSQLって何が違うの?
akagami
0
130
源内ハンズオン概要編
hideg
0
210
Featured
See All Featured
Done Done
chrislema
186
16k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
470
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
470
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
550
Prompt Engineering for Job Search
mfonobong
0
420
We Are The Robots
honzajavorek
0
310
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Why Our Code Smells
bkeepers
PRO
340
58k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
480
Transcript
www.geekymartian.com @geekymartian RoR talking to Salesforce using OAuth +
www.geekymartian.com @geekymartian Ruby
www.geekymartian.com @geekymartian Ruby Gems
www.geekymartian.com @geekymartian Ruby on Rails
www.geekymartian.com @geekymartian =
www.geekymartian.com @geekymartian OAuth
www.geekymartian.com @geekymartian OAuth dance
www.geekymartian.com @geekymartian
www.geekymartian.com @geekymartian Connected App
www.geekymartian.com @geekymartian Needed Gems restforce omniauth-salesforce
www.geekymartian.com @geekymartian Rails User Model class User < ActiveRecord::Base def
self.from_omniauth(auth) where(auth.slice(:provider, :uid).permit!).first_or_initialize.tap do |user| user.provider = auth.provider user.uid = auth.uid user.name = auth.info.name user.oauth_token = auth.credentials.token user.refresh_token = auth.credentials.refresh_token user.instance_url = auth.credentials.instance_url user.save! end end end
www.geekymartian.com @geekymartian client = Restforce.new :oauth_token => current_user.oauth_token, :refresh_token =>
current_user.refresh_token, :instance_url => current_user.instance_url, :client_id => 'YOUR-CONSUMER-KEY', :client_secret => 'YOUR-CONSUMER-SECRET' Restforce Interaction
www.geekymartian.com @geekymartian http://www.geekymartian.com/articles/ruby-on-rails-4- salesforce-oauth-implementation/
www.geekymartian.com @geekymartian Gracias!