Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
@apexdevtools/sfdx-auth-helper
Advanced tools
Authentication support library for sfdx.
To start, create an instance of the helper at the path of your sf project.
// dir containing sfdx-project.json
const workspacePath = '/path/to/my/project';
const helper = await AuthHelper.instance(workspacePath);
sf
config) // Connection.create(...) with default user auth info
const conn = helper.connect();
// Get an existing saved org by specific username or alias
helper.connect('user@mycompany.org');
helper.connect('MyOrg');
// new jsforce.Connection with default user auth info
const conn = helper.connectJsForce();
// Also supports alias / username
helper.connectJsForce('MyOrg');
// Provide fallback API version if none set in project
helper.connectJsForce('MyOrg', '57.0');
Connection
into a jsforce
one // Connection created by newer version of `@salesforce/core`
const conn = Connection.create({...});
// Use static to produce a jsforce.Connection
AuthHelper.toJsForceConnection(conn);
getDefaultUsername()
- This returns the default org username for a sfdx workspace. If no default username is set it returns undefined. If the default is an org alias that is translated to a username.reloadConfig()
- If the loaded config has changed due to some external action (e.g. org creation) the copy cached by the core library will be stale. Use this to reload, making a new helper instance will not be enough.This project uses the pnpm
package manager.
pnpm build
To run unit tests:
pnpm test
To test bundling using webpack:
pnpm test:pack
node test-bundle/bundle.js
This should execute without error.
If you encounter difficulties with the installed git hooks, they can be bypassed with --no-verify
/-n
flag on commit. To disable them completely (after install
) use npx husky uninstall
or the direct command git config --unset core.hooksPath
.
All the source code included uses a 3-clause BSD license, see LICENSE for details.
FAQs
Salesforce authentication utilities
We found that @apexdevtools/sfdx-auth-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.