-
Notifications
You must be signed in to change notification settings - Fork 126
Description
Activity
Reproduction confirmed with raw API calls
I validated this is an Auth0 Management API bug. Reproduction using only curl:
# Prerequisites:
# - An M2M app with read:prompts and update:branding scopes
# - identifier_first set to true via the dashboard (Authentication > Authentication Profile)
# 1. Read prompt settings BEFORE
curl -s "https://$AUTH0_DOMAIN/api/v2/prompts" \
-H "authorization: Bearer $TOKEN"
# 2. PATCH branding with only logo_url
curl -s -X PATCH "https://$AUTH0_DOMAIN/api/v2/branding" \
-H "authorization: Bearer $TOKEN" \
-H 'content-type: application/json' \
-d '{"logo_url":"https://example.com/logo.svg"}'
# 3. Read prompt settings AFTER
curl -s "https://$AUTH0_DOMAIN/api/v2/prompts" \
-H "authorization: Bearer $TOKEN"Results:
Before PATCH /api/v2/branding:
{
"universal_login_experience": "new",
"identifier_first": true,
"webauthn_platform_first_factor": false
}After PATCH /api/v2/branding:
{
"universal_login_experience": "new"
}Both identifier_first and webauthn_platform_first_factor are completely removed from the response after a branding PATCH that only contains logo_url. The branding PATCH response itself is correct (returns only {"logo_url": "..."}) -- the side effect is entirely server-side on the /api/v2/prompts state.
Given that this is an API-level bug, should the provider work around it in the meantime? A minimal fix would be to save and restore prompt settings around branding updates in updateBranding:
GET /api/v2/promptsbefore the branding PATCHPATCH /api/v2/branding(triggers the bug)PATCH /api/v2/promptswith the saved state to undo the reset
Example: commit
The same issue was reproducible in Auth0 CLI. There is a resent fix on it here.
@Asarew thanks for raising the issue, have verified the management API issue on my end, @duedares-rvj please provide a second review.
@Asarew we are raising the issue internally with out API team, kindly watch this thread for the updates!
Thanks!
@saltukalakus The fix you suggested on the cli looks more like a workaround.
@KartikJha Any updates to share already?
@duedares-rvj Do you have some insight on when we can expect this issue to be fixed?
We hack around the same problem via:
resource "auth0_prompt" "prompts" {
# Order the prompt after branding so identifier-first is (re)asserted in any
# run that also writes branding -- guards Auth0 provider bug #1510, where an
# auth0_branding apply can silently flip the auth profile to combined
# identifier and password.
depends_on = [auth0_branding.this]
}... but would very much like to see this bug fixed!
Checklist
Description
Adding an
auth0_brandingresource with onlylogo_urlset resets the tenant's authentication profile (identifier_first) back to "Identifier + Password." The authentication profile was configured as "Identifier First" via the dashboard and is not managed by Terraform (noauth0_promptresource in the config).I checked the provider source --
auth0_brandingcorrectly uses PATCH withomitempty, so the actual request is just:The provider code has no interaction with
/api/v2/promptsat all. The reset happens server-side. This is the same Auth0 Management API bug reported and confirmed by multiple users on the deploy CLI side (auth0/auth0-deploy-cli#842).The impact is worse in Terraform because
auth0_brandingandauth0_promptare separate resources with no guaranteed execution order. Even if both are declared, the branding PATCH may run after the prompt PATCH, undoing it. Ifauth0_promptis not declared at all (common when authentication profile was set via the dashboard), the reset is silent and permanent.Related issues:
colorsfromauth0_brandingbreaks Universal Login (similar cross-concern side effect)Expectation
PATCH /api/v2/brandingwith onlylogo_urlshould update the tenant-level logo. It should not affect settings under/api/v2/prompts, specificallyidentifier_first.Reproduction
auth0_promptresource in your Terraform configauth0_brandingresource with onlylogo_url:terraform applyThis is consistently reproducible. The workaround (confirmed by deploy CLI users) is to either exclude branding or ensure prompt settings are applied after branding.
Auth0 Terraform Provider version
Terraform version