I am trying to access the REST API using JSForce. I am connecting fine via OAuth, signing in and being redirected to where I need to be with my access token, etc. After that I am trying to access the data. Problem is, the console is showing nothing back to me… Which means that the jsforce.browser.on function is not working. See below:
jsforce.browser.init({
clientId: 'Works',
redirectUri: 'Works'
});
jsforce.browser.on('connect', function(conn)
{
conn.query('-----', function(err, res)
{
if (err)
{
return console.error(err);
}
console.log(res);
console.log("Console");
});
});
This code is supposed to work. Has anybody experienced this problem before? Any idea what is going on here?