skuid grunt with sandbox?

  • 1
  • Question
  • Updated 3 years ago
  • Answered
Is there anything I have to do differently to use skuid-grunt with a sandbox org?

I'm getting an authentication failure.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
I think you need to change your orgOptions to include nforceOptions to tell nforce (which Skuid-Grunt) uses to connect to Salesforce) that you're connecting to a Sandbox org:

var orgOptions = {
   'clientId': 'demoCliId',
   'clientSecret': 'demoCliSec',
   'username': 'demoUsrnm',
   'password': 'demoPasswd',
   'nforceOptions': {
      'environment': 'sandbox'
   }
};
(Edited)
Photo of Ethan Rogers

Ethan Rogers

  • 272 Points 250 badge 2x thumb
In addition to Zach's comment, see this list of avaliable nforceOptions: https://github.com/kevinohara80/nforce#createconnectionopts
Photo of Joseph Schreurs

Joseph Schreurs

  • 372 Points 250 badge 2x thumb
Along the same lines, I am receiving the Auth error as well... I have a custom domain sandbox.  In the nforceOptions samples it seems to specify 

environment: 'production', // optional, salesforce 'sandbox' or 'production', production default

Is there a way to override the environment for a specific domain path.  i.e.   mysite.csXX.my.salesforce.com

Thanks!
Photo of Joseph Schreurs

Joseph Schreurs

  • 372 Points 250 badge 2x thumb
Never mind...  Just need to look a little closer... 

 loginUri  is used.