- I have a managed 2GP that I want to publish on AppExchange
- This package uses triggers to make external service callouts (ex. https://example.com/api/v1/sfdata)
- I want the callouts to be authenticated with external service using OAuth JWT Bearer token flow
- This requires a signing certificate
- Certificates can't be packaged, namedcredentials can be packaged
I have read a few answers here on SF Stackexchange that connected app can help with this, and that connected app need not be packaged
- I create a connected app in my PBO
- Upload certificate to connectedapp
- How do I access the certificate from the connectedapp to be used with externalCredential in installed package in subscriber org?
- The only thing that can actually link a managed package with certificate and connected app is the namespace, so what changes do I need to make to apex or metadata to access the certificate
What is the standard way to do something like this, if the above approach is incorrect?