Skip to content

feat: support UL theme identifiers and tenant country codes#1592

Open
bkiran6398 wants to merge 6 commits into
mainfrom
DXCDT-2039/ul-identifier
Open

feat: support UL theme identifiers and tenant country codes#1592
bkiran6398 wants to merge 6 commits into
mainfrom
DXCDT-2039/ul-identifier

Conversation

@bkiran6398

@bkiran6398 bkiran6398 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

🔧 Changes

Add support for the Universal Login identifier-input refactor and introduce a new tenant-settings command group for country-codes filtering.

Universal Login theme identifiers (auth0 ul customize):

  • Add Identifiers defaults to the branding theme used by auth0 ul customize, so the customization editor starts from a valid identifier configuration (login_display: unified, otp_autocomplete: true, phone display masking/formatting).
  • Rebuild the embedded UL customize web UI from the latest atko-cic/ulp-branding-app bundle to add support for the new integrations field in theme customization.

Tenant settings country-codes (auth0 tenant-settings country-codes):

  • Add a new country-codes (alias cc) command group to manage country-codes filtering on the tenant.
    • show — display the configured mode and list (supports --json / --json-compact).
    • update — set the filtering with --list (comma-separated ISO 3166-1 alpha-2 codes) and --mode (allow or deny); prompts interactively when flags are omitted.
    • remove (alias rm) — clear the filter. Sends country_codes: null via the raw HTTP client because omitempty would otherwise drop the nil pointer and leave the filter in place.

📚 References

🔬 Testing

  • Automated: Unit tests added for the tenant-settings country-codes commands (internal/cli/tenant_settings_test.go) and the UL customize theme-identifier defaults (internal/cli/universal_login_customize_test.go). Integration cases added in test/integration/tenant-settings-test-cases.yaml covering country-codes update (allow/deny), show (table + JSON), and remove.
  • Manual — country-codes:
    • auth0 tenant-settings country-codes update --list US,GB,CA --mode allow --json
    • auth0 tenant-settings country-codes show
    • auth0 tenant-settings country-codes remove
  • Manual — UL customize: run auth0 ul customize -r standard, confirm the editor loads and the theme customization panel exposes the identifier and integrations options without warnings.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

bkiran6398 and others added 5 commits July 21, 2026 19:34
- Update the go-auth0 v1 SDK to v1.45.0, which adds the tenant
  CountryCodes and branding theme Identifiers types required by the
  tenant-settings and universal-login features.
- Add `auth0 tenant-settings country-codes` (alias `cc`) with `show`,
  `update`, and `remove` subcommands to manage phone-identifier country
  code filtering (allow/deny list) on the tenant.
- `update` sends a minimal tenant carrying only country_codes so the merge
  PATCH does not round-trip read-only fields (e.g. sandbox_versions_available)
  that the endpoint rejects.
- `remove` sends an explicit {"country_codes": null} via the raw HTTP client,
  since the SDK's omitempty tag would otherwise drop a nil pointer and
  preserve the stored value instead of clearing it.
- Defer all list/mode/ISO validation to the Management API rather than
  duplicating it client-side.
- Add CountryCodesView plus show/update/remove renderers, unit tests,
  integration cases, and regenerated command docs.
- Populate BrandingThemeIdentifiers in fetchBrandingThemeOrUseDefault so the
  customize editor starts from the API's copy-on-create defaults (unified
  login display, OTP autocomplete on, mask_digits/international phone display)
  when a tenant has no stored theme.
- Add test coverage asserting the default identifiers are applied.
- Replace YAML list values under the `json:` matcher with indexed gjson
  paths (list.0, list.1, ...) in the country-codes update/show cases.
- The commander framework unmarshals every `json:` value as a string, so
  a YAML sequence panicked at parse time with "interface {} is
  []interface {}, not string", aborting the whole integration suite before
  any assertion ran.
- Aligns these cases with the repo convention for asserting array elements
  (e.g. actions and roles test cases).
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.11688% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.63%. Comparing base (ea39ba6) to head (1df88ab).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/cli/tenant_settings.go 85.43% 10 Missing and 5 partials ⚠️
internal/display/tenant-settings.go 74.41% 9 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1592      +/-   ##
==========================================
+ Coverage   59.47%   59.63%   +0.15%     
==========================================
  Files         122      122              
  Lines       23496    23650     +154     
==========================================
+ Hits        13975    14103     +128     
- Misses       8640     8659      +19     
- Partials      881      888       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ions

- Rebuild the embedded UL customize web UI from the latest atko-cic/ulp-branding-app
  bundle, adding support for the new `integrations` field in theme customization.
- Rename the embedded JS asset (index-ec2d5a69.js -> index-a1dd6a97.js) and
  repoint index.html to the new bundle so the correct assets are served.
- Used node v22 (nvm use 22) to make assets
@bkiran6398
bkiran6398 marked this pull request as ready for review July 22, 2026 13:23
@bkiran6398
bkiran6398 requested a review from a team as a code owner July 22, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants