Skip to main content

Cross-posting from @Unlocked Packages 

 

I have a package that has some Auth Providers in it (source at the end of the post). When first developed I created the Auth Provider in a scratch org then pulled the source with force:source:pull and all was running smoothly. Now it seems I'm not able to push this package anymore to any other scratch org.

 

After executing the first force:source:push to a new scratch org I get an error with the message "You must enter a value" for the Auth Providers. This is only in the first push thou, the following push commands just don't seem to detect any result since returns a "No results found" message.

 

So I have 2 problems here:

 

* Something seems to be missing from the Auth Provider even though I initially created it in a scratch org and pulled its source.

* After first failed push, following ones don't even try to push the Auth. Providers (and related Named Credentials) again, like if they didn't exist.

 

Have anyone faced a similar issue?

 

https://github.com/jonathanwiesel/RepoExplorer

 

---

 

Update: I've reviewed the AuthProvider documentation from the Metadata API

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_authproviders.htm

 

And it seems that for OpenIdConnect provider types some information is mandatory that the force:source:pull didn't retrieve from the scratch org (defaultScopes and userInfoUrl). I tried specifying directly in the source XML then push it to the scratch org but it seems something is still missing (although with this the second issue disappears, it does try to push it every time instead of only the first).

15 comments
0/9000