Skip to content

Update from code changes: document window.mintlify.user for custom scripts - #6827

Merged
ethanpalm merged 4 commits into
mainfrom
mintlify/85d71898
Jul 31, 2026
Merged

Update from code changes: document window.mintlify.user for custom scripts#6827
ethanpalm merged 4 commits into
mainfrom
mintlify/85d71898

Conversation

@mintlify

@mintlify mintlify Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Custom JavaScript files can now read the authenticated user from window.mintlify.user and react to the new mintlify:user event. Documented the API on the custom scripts page and added a cross-link from the personalization page.

Changes

  • customize/custom-scripts.mdx: New "Access authenticated user data" subsection under Custom JavaScript covering window.mintlify.user, the mintlify:user event, signed-out behavior, and a security note about the content field.
  • create/personalization.mdx: Added a pointer from the MDX user variable section to the new custom scripts guidance.

Triggered by mintlify/mint#9665.


Note

Low Risk
Documentation-only changes with no runtime or auth logic modifications.

Overview
Documents how custom JavaScript can access the same authenticated user object as MDX’s user variable via window.mintlify.user, and how to react when it becomes available with the mintlify:user event (including signed-out null/undefined behavior and optional chaining).

On custom scripts, adds an “Access authenticated user data” section with event-listener and direct-read examples, plus a warning that anything in user content is visible in the browser. On personalization, adds a short cross-link from dynamic MDX content to that section. The same updates are mirrored in es, fr, and zh locale docs.

Reviewed by Cursor Bugbot for commit 8e99b88. Bugbot is set up for automated code reviews on this repo. Configure here.

@mintlify

mintlify Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mintlify 🟢 Ready View Preview Jul 31, 2026, 12:18 AM

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
tomee 🟢 Ready View Preview Jul 31, 2026, 12:18 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Comment thread customize/custom-scripts.mdx Outdated
Comment thread customize/custom-scripts.mdx Outdated
@ethanpalm
ethanpalm merged commit 43889a7 into main Jul 31, 2026
2 checks passed
@ethanpalm
ethanpalm deleted the mintlify/85d71898 branch July 31, 2026 17:33
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.

2 participants