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
64
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
550
Other Decks in Programming
See All in Programming
App Router への移行は「改善」となり得るのか?/ Can migration to App Router be an improvement
takefumiyoshii
1
120
DDDはなぜ難しいのか / 良いコードの定義と設計能力の壁
pospome
24
7.4k
生成 AI の中身を覗いてみよう〜基礎から医療現場での応用まで〜
soh9834
2
760
LLMチャットボットのアプリケーション設計Tips
os1ma
4
660
Crafting a Own PHP - ウキウキ手作りミニマリストPHP
uzulla
4
1.1k
Data Contracts In Practice With Debezium and Apache Flink (Kafka Summit London)
gunnarmorling
2
280
AppDeveloperCon 2024 EU: Building polyglot developer experiences in 2024
salaboy
0
380
Compiling Python to WebAssembly with py2wasm
syrusakbary
0
140
15分間でふんわり理解するDocker @ Matsuriba MAX
ukwhatn
PRO
1
340
オブジェクト指向コードレビューの新しいアプローチ
akkie76
3
1.5k
フロントエンドパフォーマンス 入門
shouta2
7
1.5k
品質とスピードを両立: TypeScriptの柔軟な型システムをバックエンドで活用する
kosui
4
890
Featured
See All Featured
How GitHub Uses GitHub to Build GitHub
holman
467
290k
The Art of Programming - Codeland 2020
erikaheidi
40
12k
Why Our Code Smells
bkeepers
PRO
330
56k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
225
51k
WebSockets: Embracing the real-time Web
robhawkes
59
6.9k
Writing Fast Ruby
sferik
619
59k
Building Adaptive Systems
keathley
29
1.8k
GitHub's CSS Performance
jonrohan
1023
450k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
111
35k
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
Designing for humans not robots
tammielis
247
25k
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!