-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Documentation edits made through Mintlify web editor * Documentation edits made through Mintlify web editor --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
ed76bd6
commit b49d667
Showing
1 changed file
with
16 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,22 @@ title: 'Introduction' | |
description: 'Give your users a personalized docs experience' | ||
--- | ||
|
||
User Auth allows you to identify and authenticate your users so that you can personalize docs content for them. your users. | ||
User Auth allows you to identify and authenticate your users so that you can personalize docs content for them. Your users. | ||
|
||
Example use cases: | ||
|
||
1. **Customize MDX content** with a user's information, such as their name, plan, or title. | ||
|
||
2. **Prefill API keys** in the API Playground for streamlined use. | ||
|
||
3. **Selectively show pages** in the navigation based on a user's groups. | ||
|
||
## What *isn't* User Auth | ||
|
||
At this time, User Auth is not meant for the following use cases: | ||
|
||
1. **Private docs content.** While you can hide pages from unauthenticated users, those pages are still accessible by anyone who can guess the URL. If your documentation contains sensitive information, User Auth is not enough to hide it. | ||
|
||
2. **A Mintlify-backed user database.** Mintlify does not store *any* information about your users. Rather, it relies on your existing infrastructure to serve as the source-of-truth for user data. | ||
|
||
<Note>If you are interested in private docs content, [contact our team](mailto:[email protected]) to explore solutions.</Note> | ||
|
@@ -35,11 +38,11 @@ Hello, {userContext.name ?? 'reader'}! | |
This feature becomes even more powerful when paired with custom data about the user. Here's a real world example that allows us to give specific instructions on how to access the User Auth feature based on the customer's existing plan: | ||
User Auth is an enterprise feature. { | ||
userContext.org === undefined | ||
? <>To access this feature, first create an account at the <a href="https://dashboard.mintlify.com/login">Mintlify dashboard</a>.</> | ||
: userContext.org.plan !== 'enterprise' | ||
? <>You are currently on the ${userContext.org.plan ?? 'free'} plan. To speak to our team about upgrading, <a href="mailto:[email protected]">contact our sales team</a>.</> | ||
: <>To request this feature for your enterprise org, <a href="mailto:[email protected]">contact our team</a>.</> | ||
userContext.org === undefined | ||
? <>To access this feature, first create an account at the <a href="https://dashboard.mintlify.com/login">Mintlify dashboard</a>.</> | ||
: userContext.org.plan !== 'enterprise' | ||
? <>You are currently on the ${userContext.org.plan ?? 'free'} plan. To speak to our team about upgrading, <a href="mailto:[email protected]">contact our sales team</a>.</> | ||
: <>To request this feature for your enterprise org, <a href="mailto:[email protected]">contact our team</a>.</> | ||
} | ||
```jsx | ||
|
@@ -59,6 +62,7 @@ User Auth is an enterprise feature. { | |
### Prefilling API Keys | ||
If you return API Playground inputs in the user info, they will automatically be prefilled in the API Playground. Make sure the name of the field in the user info is an exact match of the name in the API Playground. | ||
### Showing/Hiding Pages | ||
By default, every page is visible to every user. If you want to restrict which pages are visible to your users, you can add a `groups` field in your page metadata. | ||
|
@@ -75,10 +79,10 @@ groups: ['admin'] | |
Here's a table that displays whether a page is shown for different combinations of `groups` in UserInfo and page metadata: | ||
| | `groups` not in UserInfo | `groups: []` in UserInfo | `groups: ['admin']` in UserInfo | | ||
|:-----------------------------------|:------------------------:|:-------------------------:|:--------------------------------:| | ||
| `groups` not in metadata | ✅ | ✅ | ✅ | | ||
| `groups: []` in metadata | ❌ | ❌ | ❌ | | ||
| `groups: ['admin']` in metadata | ❌ | ❌ | ✅ | | ||
| | `groups` not in UserInfo | `groups: []` in UserInfo | `groups: ['admin']` in UserInfo | | ||
| :------------------------------ | :----------------------: | :----------------------: | :-----------------------------: | | ||
| `groups` not in metadata | ✅ | ✅ | ✅ | | ||
| `groups: []` in metadata | ❌ | ❌ | ❌ | | ||
| `groups: ['admin']` in metadata | ❌ | ❌ | ✅ | | ||
<Note>Note that an empty array in the page metadata is interpreted as "No groups should see this page."</Note> | ||
<Note>Note that an empty array in the page metadata is interpreted as "No groups should see this page."</Note> |