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
190
Using Python on Heroku and Force.com Canvas to Enhance Salesforce.com
bfagundez
2
580
Other Decks in Programming
See All in Programming
Software Architecture
hschwentner
6
2.1k
Introduction to kotlinx.rpc
arawn
0
630
ASP. NET CoreにおけるWebAPIの最新情報
tomokusaba
0
360
CI改善もDatadogとともに
taumu
0
110
知られざるDMMデータエンジニアの生態 〜かつてツチノコと呼ばれし者〜
takaha4k
4
1.3k
iOSエンジニアから始める visionOS アプリ開発
nao_randd
3
120
[JAWS-UG横浜 #80] うわっ…今年のServerless アップデート、少なすぎ…?
maroon1st
1
170
テストをしないQAエンジニアは何をしているか?
nealle
0
130
DevinとCursorから学ぶAIエージェントメモリーの設計とMoatの考え方
itarutomy
1
640
Rails アプリ地図考 Flush Cut
makicamel
1
110
Linux && Docker 研修/Linux && Docker training
forrep
23
4.5k
Writing documentation can be fun with plugin system
okuramasafumi
0
120
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Scaling GitHub
holman
459
140k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Faster Mobile Websites
deanohume
306
31k
Raft: Consensus for Rubyists
vanstee
137
6.8k
BBQ
matthewcrist
86
9.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
The Cult of Friendly URLs
andyhume
78
6.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
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!