Skip to content

fix: re-apply prompt settings after branding update to prevent Authentication Profile reset#1404

Merged
harshithRai merged 8 commits into
masterfrom
ghIssue1402
Jun 19, 2026
Merged

fix: re-apply prompt settings after branding update to prevent Authentication Profile reset#1404
harshithRai merged 8 commits into
masterfrom
ghIssue1402

Conversation

@harshithRai

@harshithRai harshithRai commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

When PATCH /api/v2/branding is called without a colors field, the Auth0 Management API silently resets the tenant's Authentication Profile (identifier_first) from "Identifier First" to "Identifier + Password". This affects any user importing a branding config that doesn't include colors.

A partial fix was shipped in v8.29.3 that reapplied prompt settings after branding, but only when prompts was present in the user's config. This fix closes the gap for the case where prompts is not managed in the config at all.

🔧 Changes

In the branding handler, prompt settings are now snapshotted before the branding PATCH and immediately re-applied after, undoing the API side-effect regardless of whether the tenant has colors configured or whether prompts is in the user's config.

No changes to the YAML or JSON config shape, this is purely an internal fix with no impact on existing configurations.

📚 References

🔬 Testing

  • Unit tests added to test/tools/auth0/handlers/branding.tests.js covering scenarios where:
    • the prompt settings snapshot/restore flow and call order
    • Branding update still succeeds if prompt settings fetch fails
  • Manually verified on a real tenant:
    • Set Authentication Profile to "Identifier First" via dashboard
    • Ran a0deploy import with a branding config containing only logo_url and no colors
    • Confirmed Authentication Profile remains "Identifier First" after import

📝 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

codecov-commenter commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.19%. Comparing base (431f0b2) to head (5c1226e).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1404   +/-   ##
=======================================
  Coverage   80.18%   80.19%           
=======================================
  Files         153      153           
  Lines        7116     7119    +3     
  Branches     1572     1573    +1     
=======================================
+ Hits         5706     5709    +3     
  Misses        760      760           
  Partials      650      650           

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

@harshithRai harshithRai marked this pull request as ready for review June 17, 2026 13:35
@harshithRai harshithRai requested a review from a team as a code owner June 17, 2026 13:35
@harshithRai harshithRai merged commit 929d324 into master Jun 19, 2026
9 checks passed
@harshithRai harshithRai deleted the ghIssue1402 branch June 19, 2026 09:45
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.

Importing branding without colors resets Authentication Profile to "Identifier + Password"

3 participants