jsforce icon indicating copy to clipboard operation
jsforce copied to clipboard

Failed to authenticate

Open fabiocarreto opened this issue 3 years ago • 1 comments

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?

fabiocarreto avatar Nov 05 '21 12:11 fabiocarreto

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.

paustint avatar Nov 05 '21 18:11 paustint