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
Bruno Fagundez
June 11, 2015
Programming
0
71
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
Tweet
Share
More Decks by Bruno Fagundez
See All by Bruno Fagundez
SF1 and the Internet of Things
bfagundez
0
200
Using Python on Heroku and Force.com Canvas to Enhance Salesforce.com
bfagundez
2
580
Other Decks in Programming
See All in Programming
Practical Tips and Tricks for Working with Compose Multiplatform Previews (mDevCamp 2025)
stewemetal
0
120
統一感のある Go コードを生成 AI の力で手にいれる
otakakot
0
2.9k
Zennの運営完全に理解した #完全に理解したTalk
wadayusuke
1
180
型付きアクターモデルがもたらす分散シミュレーションの未来
piyo7
0
750
從零到一:搭建你的第一個 Observability 平台
blueswen
1
860
Rails産でないDBを Railsに引っ越すHACK - Omotesando.rb #110
lnit
1
160
コード書くの好きな人向けAIコーディング活用tips #orestudy
77web
3
290
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
1
590
eBPFを用いたAIネットワーク監視システム論文の実装 / eBPF Japan Meetup #4
yuukit
3
750
try-catchを使わないエラーハンドリング!? PHPでResult型の考え方を取り入れてみよう
kajitack
3
500
事業戦略を理解してソフトウェアを設計する
masuda220
PRO
21
5.9k
実はすごいスピードで進化しているCSS
hayato_yokoyama
0
110
Featured
See All Featured
Designing Experiences People Love
moore
142
24k
Typedesign – Prime Four
hannesfritz
42
2.7k
Scaling GitHub
holman
459
140k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
228
22k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Site-Speed That Sticks
csswizardry
10
630
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
14
1.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
329
24k
How to Ace a Technical Interview
jacobian
276
23k
Code Review Best Practice
trishagee
68
18k
Making the Leap to Tech Lead
cromwellryan
134
9.3k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
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!