Newer Version Available

This content describes an older version of this product. View Latest

Authorize Your Production Org

JWT and Web-based flows require a production org with sandbox licenses instead of a Dev Hub. However, it’s OK if your production org is also a Dev Hub org.

The examples in Authorize an Org Using the JWT-Based Flow and Authorize an Org Using the Web-Based Flow are geared toward scratch orgs. Follow these tips to successfully authorize your production org.

  • Be sure to use https://login.salesforce.com for sfdcLoginUrl in sfdx-project.json file. Alternatively, you can use org login jwt --instance-url to specify the URL directly on the command line. This value overrides the login URL you specified in the sfdx-project.json file.
  • Specify the username for your production org when running the org login jwt command. No need to specify a Dev Hub or indicate a default Dev Hub.
  • The JWT authorization flow requires that you create a connected app. When you create the connected app, log in to your production org, not a Dev Hub org.