> For the complete documentation index, see [llms.txt](https://learn.capstorm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.capstorm.com/frequently-asked-questions/usage/where-does-copystorm-store-passwords/how-to-login-to-salesforce-using-sfdx.md).

# How to Login to Salesforce Using SFDX

For developers, a useful way to provide CopyStorm with Salesforce credentials is via a SFDX username or alias. When an SFDX username is provided, CopyStorm calls out to SFDX to create the a Salesforce session token, relying on SFDX to do all of the OAuth dirty work!

Step 1: Change the CopyStorm credential type to *SFDX Username or Alias*.

![](https://4057376488-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsbSqfKw3vSfr8qwXao4j%2Fuploads%2Fgit-blob-427d5accdcab9ca9fe54e8227ebbaf2954791b7e%2Fc55ddc98-Choose-SFDX.png?alt=media)

Step 2: Enter an SFDX username or alias.

![](https://4057376488-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsbSqfKw3vSfr8qwXao4j%2Fuploads%2Fgit-blob-731281e7749eeab4af3a94573fbfa2732e2bf4bd%2Fd88f7f7c-SFDX-Parameters.png?alt=media)

As a final step, optionally test the connection using the *Test Salesforce Connection* button.

As a best practice, we recommend using an SFDX alias rather than a username in order to support easier reuse when new scratch orgs are created.
