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
70
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
180
Using Python on Heroku and Force.com Canvas to Enhance Salesforce.com
bfagundez
2
560
Other Decks in Programming
See All in Programming
The Future of Frontend i18n : Intl.MessageFormat
sajikix
1
2.5k
いつか使える ObjectSpace / Maybe useful ObjectSpace
euglena1215
2
130
ドメイン駆動設計を実践するために必要なもの
bikisuke
3
310
The Sequel to a Dream of Ruby Parser's Grammar
ydah
1
200
Method Swizzlingを行うライブラリにおけるマルチモジュール設計
yoshikma
0
110
座談会 「Strict ConcurrencyとSwift 6が開く新時代: 私たちはどう生きるか?」
shiz
4
8.7k
実践 Advanced CallKit 〜快適な通話の実現に向けて〜
mot_techtalk
3
120
BasicBasic認証
sadnessojisan
5
3.1k
快適な開発と高セキュリティを実現するCryptoKitを活用したCoreDataのデータ暗号化術
grandbig
1
320
現代のVueとTypeScript - 型安全の活用術
minako__ph
4
3.1k
Web技術を駆使してユーザーの画面を「録画」する
yukukotani
13
6.4k
Playwrightから始めるVisual Regression Testingのススメ by とっと
totto2727
2
1.8k
Featured
See All Featured
The Language of Interfaces
destraynor
153
23k
The Pragmatic Product Professional
lauravandoore
30
6.2k
RailsConf 2023
tenderlove
27
800
Fantastic passwords and where to find them - at NoRuKo
philnash
47
2.8k
Designing with Data
zakiwarfel
98
5k
Fireside Chat
paigeccino
31
2.9k
Done Done
chrislema
180
16k
The Invisible Customer
myddelton
119
13k
How STYLIGHT went responsive
nonsquared
93
5.1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
190
16k
Raft: Consensus for Rubyists
vanstee
135
6.5k
It's Worth the Effort
3n
182
27k
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!