Determine whether to package and distribute your external client app or keep it local. Only packaged apps can be deployed to other orgs. You can package external client apps with first-generation or second-generation managed packages. Apps that use OAuth can be deployed with their own OAuth settings or they can reference settings on the org where the app was developed.
The only difference in configuration between a local and a packaged external client app is
the Distribution State setting. If you change the value in this field from
Local to Packaged, the app can be added to a managed
package.
When packaging an external client app, it’s important to know that each app contains multiple files. Like the policies and settings tabs in the External Client App Manager, the configurations that define the app are divided between policies and settings files. For added security, sensitive information isn’t packaged but remains secure on the org where it was developed. This org is the source org. If the org that downloads the app can’t associate with the source org, a new global settings file can be generated. The new file is created when the app is deployed.
We recommend that you use second-generation managed packages along with a Dev Hub org to create packageable apps. The process for packaging an external client app is no different than creating any other 2GP managed package. To create a 2GP managed package containing your external client app, you must use a Salesforce DX project. See Configure a Salesforce DX Project for External Client Apps.
You can also package external client apps with first-generation managed packages. See Package an External Client App with First-Generation Managed Packages.
- Configure Default Settings for a Packaged External Client App
External client apps include default values when packaged for distribution. These values show up in the policies tab on a distributed external client app and are edited by admins. If a developer configures custom values in the Settings tab of an external client app before packaging, those configurations don't affect the packaged policies. To change the policies values that are packaged with the app, configure the settings in the Package Default tab. - Considerations for Packaged External Client Apps with the Mobile, Notification, or Push Notification Plugin
Learn the considerations for an external client app configured with the mobile, push notification, or notification plugin. - Package an External Client App That Isn't on a Dev Hub Org
To package an external client app that wasn't created on a Dev Hub org, use a namespace to connect the org to a Dev Hub org. - Package an External Client App with First-Generation Managed Packages
Use first-generation managed packages to distribute external client apps to other orgs. Create an external client app with Packaged distribution state, add it to your managed package, and install the package in subscriber orgs.