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
74
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
210
Using Python on Heroku and Force.com Canvas to Enhance Salesforce.com
bfagundez
2
590
Other Decks in Programming
See All in Programming
今から始めるClaude Code入門〜AIコーディングエージェントの歴史と導入〜
nokomoro3
0
160
print("Hello, World")
eddie
2
530
HTMLの品質ってなんだっけ? “HTMLクライテリア”の設計と実践
unachang113
4
2.9k
Deep Dive into Kotlin Flow
jmatsu
1
340
もうちょっといいRubyプロファイラを作りたい (2025)
osyoyu
1
440
@Environment(\.keyPath)那么好我不允许你们不知道! / atEnvironment keyPath is so good and you should know it!
lovee
0
120
そのAPI、誰のため? Androidライブラリ設計における利用者目線の実践テクニック
mkeeda
2
300
Design Foundational Data Engineering Observability
sucitw
3
200
知っているようで知らない"rails new"の世界 / The World of "rails new" You Think You Know but Don't
luccafort
PRO
1
160
Reading Rails 1.0 Source Code
okuramasafumi
0
210
「手軽で便利」に潜む罠。 Popover API を WCAG 2.2の視点で安全に使うには
taitotnk
0
860
個人軟體時代
ethanhuang13
0
320
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
For a Future-Friendly Web
brad_frost
180
9.9k
GitHub's CSS Performance
jonrohan
1032
460k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
Docker and Python
trallard
45
3.6k
The Pragmatic Product Professional
lauravandoore
36
6.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Code Reviewing Like a Champion
maltzj
525
40k
Designing Experiences People Love
moore
142
24k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
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!