Closed kterusaki closed 9 years ago
The nforce
supports multi
and single
modes.
In the single
mode you have not to provide OAuth to queries, but you have to createConnection
with
{ mode: 'single' }
option.
See Usage section.
@michacom Got it, I didn't quite understand the use of multi and single modes, but not it makes sense. Thank you!
Thanks @michacom
I noticed in your documentation that you don't pass in the auth variable when querying Salesforce. However, when I do this I get an error:
This makes sense since you always need to pass in the access token to retrieve any information from Salesforce (at least that's my understanding of the rest api). Thus, I thought maybe you just have to set the res in the authenticate method callback to org.oauth and the DML methods for org would reference that variable when making REST calls to Salesforce like below:
However, when running the above code, I get the same error. If you're always supposed to pass in the auth object on any REST calls, what's the point of having the auth key in the org object? Why not set the auth object to the auth key in the org object and have the REST calls reference it from the org object?