From 7a70f5b58a97b1dbf8cc9750e276995da2fa5833 Mon Sep 17 00:00:00 2001 From: Harshith Rai Date: Wed, 1 Jul 2026 17:48:03 +0530 Subject: [PATCH 1/2] fix: preserve false value for default_head_tags_disabled in screen renderer update --- src/tools/auth0/handlers/prompts.ts | 2 +- test/tools/auth0/handlers/prompts.tests.ts | 36 +++++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/tools/auth0/handlers/prompts.ts b/src/tools/auth0/handlers/prompts.ts index f092112e7..aaceffc68 100644 --- a/src/tools/auth0/handlers/prompts.ts +++ b/src/tools/auth0/handlers/prompts.ts @@ -610,7 +610,7 @@ export default class PromptsHandler extends DefaultHandler { updatePayload = { ...updatePrams, rendering_mode: Management.AculRenderingModeEnum.Advanced, - default_head_tags_disabled: screenRenderer.default_head_tags_disabled || undefined, + default_head_tags_disabled: screenRenderer.default_head_tags_disabled ?? undefined, head_tags: screenRenderer.head_tags as Management.AculHeadTag[], }; } diff --git a/test/tools/auth0/handlers/prompts.tests.ts b/test/tools/auth0/handlers/prompts.tests.ts index 4f647cf46..a65760420 100644 --- a/test/tools/auth0/handlers/prompts.tests.ts +++ b/test/tools/auth0/handlers/prompts.tests.ts @@ -440,8 +440,9 @@ describe('#prompts handler', () => { return Promise.resolve({ data }); }, rendering: { - update: () => { + update: (_prompt: string, _screen: string, payload: { default_head_tags_disabled?: boolean | null }) => { didCallUpdateScreenRenderer = true; + expect(payload).to.have.property('default_head_tags_disabled', false); return Promise.resolve({ data: {} }); }, }, @@ -650,6 +651,39 @@ describe('#prompts handler', () => { }); sinon.restore(); }); + + it('should send default_head_tags_disabled: false to the API (not drop it as undefined)', async () => { + let capturedPayload: any = null; + + const auth0 = { + prompts: { + rendering: { + update: (_prompt: string, _screen: string, payload: any) => { + capturedPayload = payload; + return Promise.resolve({ data: {} }); + }, + }, + }, + pool: new PromisePoolExecutor({ + concurrencyLimit: 3, + frequencyLimit: 1000, + frequencyWindow: 1000, + }), + }; + + const handler = new promptsHandler({ client: auth0, config: config }); + + await handler.updateScreenRenderer({ + prompt: 'login', + screen: 'login', + rendering_mode: 'advanced', + default_head_tags_disabled: false, + head_tags: [], + }); + + expect(capturedPayload).to.not.equal(null); + expect(capturedPayload).to.have.property('default_head_tags_disabled', false); + }); }); describe('withErrorHandling', () => { let handler: any; From 72f6b7d90e27ed93037f0317644168938a2a8ce7 Mon Sep 17 00:00:00 2001 From: Harshith Rai Date: Wed, 1 Jul 2026 18:33:11 +0530 Subject: [PATCH 2/2] format: prettier fixes --- test/tools/auth0/handlers/prompts.tests.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/tools/auth0/handlers/prompts.tests.ts b/test/tools/auth0/handlers/prompts.tests.ts index a65760420..19abfb855 100644 --- a/test/tools/auth0/handlers/prompts.tests.ts +++ b/test/tools/auth0/handlers/prompts.tests.ts @@ -440,7 +440,11 @@ describe('#prompts handler', () => { return Promise.resolve({ data }); }, rendering: { - update: (_prompt: string, _screen: string, payload: { default_head_tags_disabled?: boolean | null }) => { + update: ( + _prompt: string, + _screen: string, + payload: { default_head_tags_disabled?: boolean | null } + ) => { didCallUpdateScreenRenderer = true; expect(payload).to.have.property('default_head_tags_disabled', false); return Promise.resolve({ data: {} });