Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
77
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
220
Using Python on Heroku and Force.com Canvas to Enhance Salesforce.com
bfagundez
2
590
Other Decks in Programming
See All in Programming
TestingOsaka6_Ozono
o3
0
150
tparseでgo testの出力を見やすくする
utgwkk
2
220
AIコーディングエージェント(NotebookLM)
kondai24
0
190
チームをチームにするEM
hitode909
0
330
connect-python: convenient protobuf RPC for Python
anuraaga
0
410
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
150
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
110
JETLS.jl ─ A New Language Server for Julia
abap34
1
400
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.8k
【Streamlit x Snowflake】データ基盤からアプリ開発・AI活用まで、すべてをSnowflake内で実現
ayumu_yamaguchi
1
120
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.3k
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
180
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
57k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
We Have a Design System, Now What?
morganepeng
54
7.9k
Documentation Writing (for coders)
carmenintech
76
5.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
A better future with KSS
kneath
240
18k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Six Lessons from altMBA
skipperchong
29
4.1k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Rails Girls Zürich Keynote
gr2m
95
14k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
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!