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
68
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
Introduction to GitOps
hwchiu
0
110
CSC307 Lecture 07
javiergs
PRO
0
220
最古の関数型言語「Lisp」ことはじめ / lisp_in_kamiyama
uhooi
1
190
開発部に不満を持っていたCSがエンジニアにジョブチェンしてわかった「勝手に諦めない」ことの大切さ
sakuraikotone
28
16k
CSC307 Lecture 06
javiergs
PRO
0
360
3 Effective Rules for Success with Signals in Angular
manfredsteyer
PRO
0
120
英語
s_shimotori
1
220
実用的かつリーズナブルな 「Azure × Gemini × LINE」~キャラクターBot 実装ライブデモ~
tomodo_ysys
1
170
スクラムマスターって孤独じゃないですか?
yoshitaroyoyo
1
140
みんなのオブザーバビリティプラットフォームを作ってるんだがパフォーマンスがやばい #mackerelio #srenext
ne_sachirou
0
370
CSC307 Lecture 13
javiergs
PRO
0
150
Async Await: Mastering Python's Time-Bending Tricks - EuroPython2024
yanbo
1
290
Featured
See All Featured
Scaling GitHub
holman
458
140k
Unsuck your backbone
ammeep
666
57k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
20
7.2k
The Pragmatic Product Professional
lauravandoore
29
6.1k
Documentation Writing (for coders)
carmenintech
63
4.2k
Making Projects Easy
brettharned
111
5.7k
Designing Experiences People Love
moore
136
23k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
17
8.7k
Building Adaptive Systems
keathley
34
2k
A Modern Web Designer's Workflow
chriscoyier
689
190k
The Brand Is Dead. Long Live the Brand.
mthomps
52
36k
Design by the Numbers
sachag
277
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!