jsforce
jsforce copied to clipboard
Failed to authenticate
Hi,
I'm using jsforce and all went well while connecting to test.salesforce.com, but after connecting to production I'm getting an error:
"Error: INVALID_LOGIN: Invalid username, password, security token; or user locked out."
let conn = null;
if(process.env.ENV !== 'PROD'){
conn = new jsforce.Connection({
loginUrl : 'https://test.salesforce.com'
});
}
else{
conn = new jsforce.Connection();
}
Can someone help me, as the website is already up and running on production?
Make sure your password and security token are valid, as the error message is explicitly letting you know your credentials are not valid.
If you did not use a security token in the sandbox, then you probably had your IP address whitelisted (setting on profile), which is the only way you can avoid using the security token with username+password auth.