Jsforce: Will JSForce support Lightning Component usage?

Created on 4 Sep 2015  路  3Comments  路  Source: jsforce/jsforce

I tried to refactor an existing JSForce / Visualforce application I have to work in Lightning components. Most of the refactoring was pretty straight-forward, until I get to the actual callouts. Then, I get an error: "Refused to connect to xxxx because it violates the following Content Security Policy directive: "connect-src 'self'". It looks like it can't connect to the proxy service ( I have proxyUrl: '/services/proxy' set in Connection).
Any thoughts?

question

Most helpful comment

Well, that is a shame. Lightning seems like the perfect use case for the
JSForce libraries. Hopefully, they will come out with a proxy, or, will at
least allow callouts to their own domain (salesforce's) APIs.
Thanks for the response!

All 3 comments

Unfortunately lightning component does not allow to invoke API endpoint from component JavaScript. Additionally, there's no proxy endpoint available in the lightning domain. You need to prepare a Apex class that proxies API request as written here, but JSforce is not supporting it currently.

Well, that is a shame. Lightning seems like the perfect use case for the
JSForce libraries. Hopefully, they will come out with a proxy, or, will at
least allow callouts to their own domain (salesforce's) APIs.
Thanks for the response!

Is it still not possible to use JsForce even with Content Security Policy Trusted Sites?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

myke11j picture myke11j  路  4Comments

stomita picture stomita  路  5Comments

rogah picture rogah  路  8Comments

jbonigomes picture jbonigomes  路  3Comments

akatechis picture akatechis  路  4Comments