-
Notifications
You must be signed in to change notification settings - Fork 0
Managing Secrets
David B edited this page Dec 18, 2025
·
8 revisions
GitHub securely authenticates to Salesforce using OAuth tokens.
These are typically stored in GitHub under Org Settings > Secrets or Repository Settings > Secrets.
The following secrets are critical for successful testing and delivery of a Salesforce package:
| Secret Name | Alternative Name | Purpose |
|---|---|---|
DEV_HUB_AUTH_URL |
sfdxAuthUrl |
Enables the creation of scratch orgs during CI/CD operations |
CUMULUSCI_TOKEN |
GitHub PAT |
Enables execution of remote GitHub actions (e.g. nimba-actions/standard-workflows) |
Should you ever need to update stored OAuth tokens or create additional secrets, you will need to generate an sfdxAuthUrl using the Salesforce/CLI.
Important
You must complete the following prerequisites before proceeding
-
Authenticate to Salesforce using
salesforce/cli:- Open your terminal or command prompt.
- Use the Salesforce CLI to log in to your Salesforce org by running the following command:
# replace `<your-org-alias>` with any value you desire eg "MyDevhub"... sf org login web --alias <your-org-alias>
- This command will open a browser window where you can log in to Salesforce. After logging in, your org will be authenticated with the Salesforce CLI.
-
Generate the Auth URL:
- After logging in, generate the
sfdxAuthUrlby running:# replace `<your-org-alias>` with the same alias you used in the previous step... sf org display -o <your-org-alias> --verbose --json > orgInfo.json
- The command will display the details of the authenticated org, including the
sfdxAuthUrl.
- After logging in, generate the
-
Copy the Auth URL:
- Look for the line that starts with
SFDX Auth Urland copy the URL provided. It will look something like this:force://<client_id>:<client_secret>@<instance_url>/<refresh_token>
- Look for the line that starts with
-
Use the Auth URL:
- Paste this
sfdxAuthUrlvalue into your desired Repository Secret. - Save.
- Paste this
-
Security: Handle the
sfdxAuthUrlsecurely, as it contains sensitive information that can provide access to your Salesforce org. - Token Expiration: Be aware that the refresh token included in the URL might have an expiration policy, depending on your Salesforce org settings.