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
81
0
Share
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
240
Using Python on Heroku and Force.com Canvas to Enhance Salesforce.com
bfagundez
2
610
Other Decks in Programming
See All in Programming
AIエージェントの隔離技術の徹底比較
kawayu
0
390
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
260
Swiftのレキシカルスコープ管理
kntkymt
0
180
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
4
480
Transactional Change Stream Processing With Debezium and Apache Flink
gunnarmorling
1
120
AI時代になぜ書くのか
mutsumix
0
440
PHPでローカル環境用のSSL/TLS証明書を発行することはできるのか? #phpconkagawa
akase244
0
380
Firefoxにコントリビューションして得られた学び
ken7253
2
170
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
1
750
Modding RubyKaigi for Myself
yui_knk
0
380
oxlintはeslint/typescript-eslintを置き換えられるのか
shomafujita
2
140
Sans tests, vos agents ne sont pas fiables
nabondance
0
150
Featured
See All Featured
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Automating Front-end Workflow
addyosmani
1370
210k
How STYLIGHT went responsive
nonsquared
100
6.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Color Theory Basics | Prateek | Gurzu
gurzu
0
310
The Cult of Friendly URLs
andyhume
79
6.9k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.9k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
200
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
200
Information Architects: The Missing Link in Design Systems
soysaucechin
0
930
Leo the Paperboy
mayatellez
7
1.8k
A better future with KSS
kneath
240
18k
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!