richardvanhook / databasedotcom-oauth2 Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
ola
Hi,
I've been using your sample login application (databasedotcom-oauth2-sinatra-jqm) and the code in this gem to try and set up a log in page for users to select which endpoint they should log in through. I have set up my endpoints like so:
use Databasedotcom::OAuth2::WebServerFlow,
:debugging => true,
:token_encryption_key => Base64.strict_decode64(settings.force['encrypt_key']),
:display => "touch", # will force salesforce login to be optimized for touch
:endpoints => {"login.salesforce.com" => {
:key => settings.force['client_id'],
:secret => settings.force['client_secret']},
"myco.secure.force.com" => {
:key => settings.force['client_id'],
:secret => settings.force['client_secret']}}
And my login page has two links:
- Click [here](/auth/salesforce?state=%2F&terms=on&endpoint=login.salesforce.com) to login through salesforce.
- Click [here](/auth/salesforce) to login through customer portal.
However I can never get the gem to take the login.salesforce.com. It will always try to use myco.secure.force.com (or whichever is last in the endpoints list).
I have tried all permutations of the /auth/salesforce link. In reading the gem, I would think that the following should work:
/auth/salesforce?endpoint=login.salesforce.com
but no cigar. I've even tried using the exact link from the sinatra sample you've provided and it ignores the endpoint there. Is there a setting I am supposed to change to allow the endpoints to be selected?
Thank you,
~mattie ruth
I am using Rails 2.3.14 with Ruby 1.8.
I am facing an issue with the gem i.e.:
NameError Exception: undefined local variable or method `env' for #Class:0xb3fd40b8
Can you guide me something so that it can work with Rails 2?
I am admittedly new to Salesforce and its API integration, but in using your gem, I have no issues materializing an Sobject the first time I load a page, but on subsequent refreshes, I get an error stating "The requested resource does not exist". The only way to fix it is to shut down my development server and restart it. I am assuming I am just doing something wrong since no one else has mentioned an issue but is this something you have come across?
Trying to Query via OAuth2 (utilizing databasedotcom-oauth2) using Postgres as well (on Heroku) -- authentication no problem working very well; ability to query etc.. also working.
Trying to "Create/Save/Update" into Postgres is showing itself to be problematic. I apologize up front for bugging you - but how would I do this with this gem? I can via OmniAuth + OmniAuth-Salesforce, but the challenges on interaction with sf.com is a bit diffcult; dbdc-oauth2 gem overcomes that in a huge way, but now saving into Postgres is -- for my small brain at least -- proving impossible. Any chance you have example?
We are trying to give a feature within our app to export contacts to SFDC. We want to use OAuth to authenticate user's SFDC credentials.
I am trying to figure out how I can dynamically provide the client id/key based on the authenticated user.
The gem documentation talks only about configuring secret/key for the entire application.
I keep getting this error
{"message"=>"undefined method
refresh_token=' for #Databasedotcom::Client:0x007f279ad68b98",
"state"=>"/?endpoint=login.salesforce.com"}`
in
status, headers, response = @app.call(env)
What am i doing wrong?
Can you update the gems? There are 5 security alerts on gemnasium:
https://gemnasium.com/richardvanhook/databasedotcom-oauth2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.