auth0 / auth0-deploy-cli

The Auth0 Deploy CLI is a tool that helps you manage your Auth0 tenant configuration. It integrates into your development workflows as a standalone CLI or as a node module.
MIT License
248 stars 156 forks source link

Fetch clients if not defined in client grants YAML handler #865

Closed willvedd closed 1 year ago

willvedd commented 1 year ago

🔧 Changes

While troubleshooting #855, I noticed that for YAML exports, an exported client grant wouldn't have the client_id swapped with its correlating client's name if the clients didn't exist in the assets object. This should be fairly rare but still technically possible in cases where you're excluding clients from the management purview.

🔬 Testing

Added two new test cases to round-out all possibilities:

  1. Clients exist on assets object already, client name replace for ID
  2. Clients do not exist on assets, clients fetched but ID not replaced for name because no correlating client exists
  3. Clients do not exist on assets, clients fetched and ID replaced for name because correlating client found

📝 Checklist