Skip to content

Fix script tag validation with JWT signed fields#375

Open
rishab-intercom wants to merge 1 commit intomasterfrom
shab/fix-jwt-signed-fields-validation
Open

Fix script tag validation with JWT signed fields#375
rishab-intercom wants to merge 1 commit intomasterfrom
shab/fix-jwt-signed-fields-validation

Conversation

@rishab-intercom
Copy link
Copy Markdown

Why?

When both user_id and email are configured as signed_user_fields, they get deleted from the user_details hash during JWT promotion. The valid? method then checks that same (now-empty) hash, returns false, and the script tag is silently hidden from views.

How?

Capture identity presence (user_id or email) before JWT signing deletes the fields, then use the cached boolean in valid?. Two-line production change, zero interface changes.

Generated with Claude Code

…fields

When both user_id and email are configured as signed_user_fields, they are
deleted from user_details during JWT promotion. The valid? check then finds
neither field and silently suppresses the script tag. Fix by capturing
identity presence before the fields are moved to the JWT payload.

Related to intercom/intercom#430057

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rishab-intercom rishab-intercom self-assigned this Apr 13, 2026
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.

1 participant