Fix: Universal Login Authentication Profile reverts to Identifier+Password after import #1333
Merged
ankita10119 merged 2 commits intomasterfrom Mar 24, 2026
Merged
Fix: Universal Login Authentication Profile reverts to Identifier+Password after import #1333ankita10119 merged 2 commits intomasterfrom
ankita10119 merged 2 commits intomasterfrom
Conversation
…sword after import
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1333 +/- ##
=======================================
Coverage 80.16% 80.16%
=======================================
Files 152 152
Lines 6095 6096 +1
Branches 1247 1247
=======================================
+ Hits 4886 4887 +1
Misses 693 693
Partials 516 516 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This fix should resolve #842 |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔧 Changes
Problem
When an import YAML includes a branding section alongside
prompts.identifier_first: true, the Authentication Profile reverts from "Identifier First" back to "Identifier+Password" on newer Auth0 tenants after runninga0deploy import. The issue does not occur when the branding section is absent from the YAML.Root Cause
The
PromptsHandler.processChangeshad no@orderdecorator, causing it to default to execution order 50. TheBrandingHandler.processChangesruns at order 70. This meant:PATCH /api/v2/prompts→ setsidentifier_first: truePATCH /api/v2/branding→ resetsidentifier_firston newer tenants as a backend side effectSince branding ran after prompts, the branding update was silently undoing the
identifier_firstsetting, but only on newer tenants where the backend behaves differently.Fix
Added
@order('80')to PromptsHandler.processChanges and imported the order decorator in prompts.ts. The execution order is now:This ensures prompts always runs after branding, so even if
PATCH /api/v2/brandingresetsidentifier_firston newer tenants, the prompts handler re-applies it correctly afterwards.src/tools/auth0/handlers/prompts.ts: imported order decorator and added@order('80')to processChanges📚 References
🔬 Testing
Reproduction confirmed using a minimal setup:
buggy.yaml- includes both branding andprompts.identifier_first: trueworking.yaml- includes onlyprompts.identifier_first: true, no branding sectionBefore fix:
node ./lib/index.js import -c config.json -i ./local/buggy.yamlResult: Authentication Profile reverted to "Identifier+Password"
After fix:
npm run build && node ./lib/index.js import -c config.json -i ./local/buggy.yamlResult: Authentication Profile remained "Identifier First"
Both
buggy.yamlandworking.yamlnow produce the correct result📝 Checklist