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.comforsfdcLoginUrlin sfdx-project.json file. Alternatively, you can useorg login jwt --instance-urlto 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 jwtcommand. 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.