Skip to content

feat: add UL identifier input support for themes and tenant settings#1433

Draft
harshithRai wants to merge 1 commit into
masterfrom
DXCDT-1942
Draft

feat: add UL identifier input support for themes and tenant settings#1433
harshithRai wants to merge 1 commit into
masterfrom
DXCDT-1942

Conversation

@harshithRai

Copy link
Copy Markdown
Contributor

🔧 Changes

This PR adds Deploy CLI support for the UL Identifier Input Refactor & Mobile UX Enhancements initiative, covering two additive Management API surfaces. Both are Early Access and gated behind per-tenant feature flags.

  • Bumped auth0 SDK ^6.0.0^6.1.0 to pick up the BrandingThemeIdentifiers and TenantSettingsCountryCodes types, which are wired through the relevant request/response content. No handler logic changes were needed - the fields flow through the existing payload spreads once the types carry them.
  • Themes (src/tools/auth0/handlers/themes.ts): added the identifiers object to the theme schema - login_display (separate|unified), otp_autocomplete (boolean), and phone_display (formatting: international|regional, masking: hide_country_code|mask_digits|show_all). Gated by the universal_login_theme_identifiers flag.
  • Tenant settings (src/tools/auth0/handlers/tenant.ts): added the nullable country_codes object - list (ISO 3166-1 alpha-2 codes, unique, non-empty) and mode (allow|deny). Set country_codes: null to remove filtering. Gated by the tenant_country_codes_filtering flag.
  • Added documentation sections for both surfaces in docs/resource-specific-documentation.md.
    New configuration shapes

Theme identifiers (under a themes entry):

themes:
  - displayName: Default theme
    # ...existing borders, colors, fonts, page_background, widget...
    identifiers:
      login_display: unified          # separate | unified
      otp_autocomplete: true
      phone_display:
        masking: mask_digits          # hide_country_code | mask_digits | show_all
        formatting: international      # international | regional
{
  "displayName": "Default theme",
  "identifiers": {
    "login_display": "unified",
    "otp_autocomplete": true,
    "phone_display": {
      "masking": "mask_digits",
      "formatting": "international"
    }
  }
}

Tenant country_codes (under tenant; set to null to remove filtering):

tenant:
  country_codes:
    list:
      - US
      - GB
      - CA
    mode: allow                       # allow | deny
{
  "country_codes": {
    "list": ["US", "GB", "CA"],
    "mode": "allow"
  }
}

🔬 Testing

  • Unit tests added for both surfaces:
    • Themes: identifiers passes through on both create (no existing default theme) and update (existing default theme).
    • Tenant: country_codes object is sent on update, and country_codes: null is preserved to clear filtering.
  • Full non-e2e suite: 1332 passing, 1 pending.
  • tsc --noEmit, ESLint, and prettier --check all clean.
  • Not covered by unit tests: the server-side 400 validation matrix (empty object, list without mode, invalid ISO codes, flag-off rejection) is enforced by the Management API and requires the feature flags enabled on a live tenant; not replicated client-side.

📝 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)

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@52b338f). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1433   +/-   ##
=========================================
  Coverage          ?   80.23%           
=========================================
  Files             ?      163           
  Lines             ?     7533           
  Branches          ?     1663           
=========================================
  Hits              ?     6044           
  Misses            ?      800           
  Partials          ?      689           

☔ 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.

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