realdoug / omniauth-salesforce

OmniAuth strategy for salesforce.com
MIT License
65 stars 90 forks source link

Login by sandbox salesforce account #11

Closed mo-rubikal closed 10 years ago

mo-rubikal commented 10 years ago

Enable login by salesforce accounts for a sandbox accounts, always redirect to login.salesforce.com

i have config.omniauth :salesforce, configatron.salesforce.app_id, configatron.salesforce.app_secret

so i tried to replace this line with

config.omniauth :salesforce_sandbox, configatron.salesforce.app_id, configatron.salesforce.app_secret

failed with error: Not found. Authentication passthru.

or

config.omniauth OmniAuth::Strategies::SalesforceSandbox, configatron.salesforce.app_id, configatron.salesforce.app_secret

failed with error: undefined method `to_sym' for OmniAuth::Strategies::SalesforceSandbox:Clas

when change Strategy it should reflect using test.salesforce.com but it doesn't?

realdoug commented 10 years ago

Hey @mohamed-mahmoud can you let me know what version of omniauth-salesforce you're using?

Here is an example app that works with sandboxes: https://omniauth-salesforce-example.herokuapp.com/

The code is here: https://github.com/richardvanhook/omniauth-salesforce-example

Can you figure out what is different between the code you're running and the above example? Are you running Rails or Sinatra? I can get you a working example in Rails if you need.

Doug