User Auth
Introduction
Give your users a personalized docs experience
User Auth lets you identify and authenticate users to create personalized documentation experiences.
Key Features
- Customize Content - Display user-specific information like names or account details
- Prefill API Keys - Automatically populate API playground inputs
- Control Access - Show/hide pages based on user groups
What isn’t User Auth
User Auth is not designed for:
- Private docs content - Pages remain accessible via URL even if hidden from navigation
- User database storage - Mintlify doesn’t store user data; it uses your existing infrastructure
For private documentation needs, contact our team.
How to Use
Customizing Content
Use the userContext
variable to access user information:
Always use optional chaining (e.g., userContext.org?.plan
) since userContext
is empty ({}
) for logged-out users.
Prefilling API Keys
API Playground inputs are automatically prefilled when matching field names are found in the user info.
Managing Page Visibility
Control page visibility using the groups
field in your page metadata:
This page will only be visible to users in the ‘admin’ group.
Was this page helpful?