Overview
Control who sees your documentation and customize their experience
Authentication methods are available on the Growth and Enterprise plans. Please contact sales for more information.
There are three approaches to manage access and customize your documentation based on user information.
- Authentication: Complete privacy protection for all content with full content customization.
- Partial authentication: Page-by-page access control with full content customization.
- Personalization: Content customization with no security guarantees. All content remains publicly accessible.
Choose authentication if you need complete security and privacy for all your documentation, including pages, images, search results, and AI assistant features.
Choose partial authentication if you want some pages to be public and others private.
Choose personalization if you want to customize content based on user information and your documentation can be publicly accessible.
Handshake methods
Authentication and personalization offer multiple handshake methods for controlling access to your content.
Available for all methods
JSON Web Token (JWT): Custom system where you manage user tokens with full control over the login flow.
- Pros of JWT:
- Reduced risk of API endpoint abuse.
- No CORS configuration.
- No restrictions on API URLs.
- Cons of JWT:
- Must be compatible with your existing login flow.
- Dashboard sessions and docs authentication are decoupled, so your team will log into your dashboard and your docs separately.
- When you refresh user data, users must log into your docs again. If your users’ data changes frequently, they must log in frequently or risk having stale data in your docs.
OAuth 2.0: Third-party login integration like Google, GitHub, or other OAuth providers.
- Pros of OAuth 2.0:
- Heightened security standard.
- No restrictions on API URLs.
- Cons of OAuth 2.0:
- Requires significant work if setting up an OAuth server for the first time.
- Dashboard sessions and docs authentication are decoupled, so your team will log into your dashboard and your docs separately.
Available for authentication and partial authentication
Mintlify dashboard: Allow all of your dashboard users to access your docs.
- Pros of Mintlify dashboard:
- No configuration required.
- Enables private preview deployments, restricting access to authenticated users only.
- Cons of Mintlify dashboard:
- Requires all users of your docs to have an account in your Mintlify dashboard.
Password: Shared access with a single global password. Used for access control only. Does not allow for personalization.
- Pros of password:
- Simple setup with no configuration required to add new users, just share the password.
- Cons of password:
- Lose personalization features since there is no way to differentiate users with the same password.
- Must change the password to revoke access.
Available for personalization
Shared session: Use the same session token as your dashboard to personalize content.
- Pros of shared session:
- Users that are logged into your dashboard are automatically logged into your docs.
- User sessions are persistent so you can refresh data without requiring a new login.
- Minimal setup.
- Cons of shared session:
- Your docs will make a request to your backend.
- You must have a dashboard that uses session authentication.
- CORS configuration is generally required.
Content customization
All three methods allow you to customize content with these features.
Dynamic MDX
content
Display dynamic content based on user information like name, plan, or organization.
The user
variable contains information sent to your docs from logged in users. See Sending data for more information.
Example: Hello, !
This feature is more powerful when you pair it with custom data about your users. For example, you can give different instructions based on a user’s plan.
Example: Authentication is an enterprise feature.
The information in user
is only available for logged in users. For
logged out users, the value of user
will be {}
. To prevent the page from
crashing for logged out users, always use optional chaining on your user
fields. For example, {user.org?.plan}
.
API key prefilling
Automatically populate API playground fields with user-specific values by returning matching field names in your user data. The field names in your user data must exactly match the names in the API playground for automatic prefilling to work.
Page visibility
Restrict which pages are visible to your users by adding groups
fields to your pages’ frontmatter. By default, every page is visible to every user.
Users will only see pages for groups
that they are in.