You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: protected-pages/overview.mdx
+1-77Lines changed: 1 addition & 77 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Overview"
3
3
description: "Control access to your documentation"
4
4
icon: "badge-info"
5
-
keywords: ["auth"]
5
+
keywords: ["auth", "authentication"]
6
6
---
7
7
8
8
<Info>
@@ -16,8 +16,6 @@ You can make all of your content private or control access on a page-by-page bas
16
16
17
17
## Handshake methods
18
18
19
-
TODO: verify that SSO is still an option
20
-
21
19
**JSON Web Token (JWT)**: Custom system where you manage user tokens with full control over the login flow.
22
20
23
21
- Pros of JWT:
@@ -53,77 +51,3 @@ TODO: verify that SSO is still an option
53
51
- Cons of password:
54
52
- Lose personalization features since there is no way to differentiate users with the same password.
55
53
- Must change the password to revoke access.
56
-
57
-
**Shared session**: Use the same session token as your dashboard to personalize content.
58
-
59
-
- Pros of shared session:
60
-
- Users that are logged into your dashboard are automatically logged into your docs.
61
-
- User sessions are persistent so you can refresh data without requiring a new login.
62
-
- Minimal setup.
63
-
- Cons of shared session:
64
-
- Your docs will make a request to your backend.
65
-
- You must have a dashboard that uses session authentication.
66
-
- CORS configuration is generally required.
67
-
68
-
## Content customization
69
-
70
-
TODO: this might all be moved
71
-
72
-
When users are authenticated to your docs, you can customize their experience with dynamic content.
73
-
74
-
### Dynamic `MDX` content
75
-
76
-
Display dynamic content based on user information like name, plan, or organization.
77
-
78
-
The `user` variable contains information sent to your docs from logged in users. See [Sending data](/protected-pages/sending-data) for more information.
79
-
80
-
**Example**: Hello, {user.name??'reader'}!
81
-
82
-
```jsx
83
-
Hello, {user.name??'reader'}!
84
-
```
85
-
86
-
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.
87
-
88
-
**Example**: Authentication is an enterprise feature. {
89
-
user.org === undefined
90
-
? <>To access this feature, first create an account at the <a href="https://dashboard.mintlify.com/login">Mintlify dashboard</a>.</>
91
-
: user.org.plan !== 'enterprise'
92
-
? <>You are currently on the ${user.org.plan??'free'} plan. To speak to our team about upgrading, <a href="mailto:[email protected]">contact our sales team</a>.</>
93
-
:<>To request this feature for your enterprise org, <a href="mailto:[email protected]">contact our team</a>.</>
94
-
}
95
-
96
-
```jsx
97
-
Authentication is an enterprise feature. {
98
-
user.org === undefined
99
-
? <>To access this feature, first create an account at the <a href="https://dashboard.mintlify.com/login">Mintlify dashboard</a>.</>
100
-
: user.org.plan !== 'enterprise'
101
-
? <>You are currently on the ${user.org.plan??'free'} plan. To speak to our team about upgrading, <a href="mailto:[email protected]">contact our sales team</a>.</>
102
-
:<>To request this feature for your enterprise org, <a href="mailto:[email protected]">contact our team</a>.</>
103
-
}
104
-
```
105
-
106
-
<Note>
107
-
The information in `user` is only available for logged in users. For logged
108
-
out users, the value of `user` will be `{}`. To prevent the page from crashing
109
-
for logged out users, always use optional chaining on your `user` fields. For
110
-
example, `{user.org?.plan}`.
111
-
</Note>
112
-
113
-
### API key prefilling
114
-
115
-
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.
116
-
117
-
### Page visibility
118
-
119
-
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.
120
-
121
-
Users will only see pages for `groups` that they are in.
122
-
123
-
```mdx
124
-
---
125
-
title:"Managing your users"
126
-
description:"Adding and removing users from your organization"
0 commit comments