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
@@ -19,107 +19,64 @@ Authentication requires users to log in before accessing your documentation. Thi
19
19
Select the handshake method that you want to configure.
20
20
21
21
<Tabs>
22
-
<Tabtitle="JWT">
22
+
<Tabtitle="Password">
23
+
<Info>
24
+
Password authentication provides access control only and does **not** support content personalization.
25
+
</Info>
26
+
23
27
### Prerequisites
24
28
25
-
* An authentication system that can generate and sign JWTs.
26
-
* A backend service that can create redirect URLs.
29
+
* Your security requirements allow sharing passwords among users.
27
30
28
31
### Implementation
29
32
30
33
<Steps>
31
-
<Steptitle="Generate a private key.">
34
+
<Steptitle="Create a password.">
32
35
1. In your dashboard, go to [Authentication](https://dashboard.mintlify.com/settings/deployment/authentication).
33
36
2. Select **Full Authentication** or **Partial Authentication**.
34
-
3. Select **JWT**.
35
-
4. Enter the URL of your existing login flow and select **Save changes**.
36
-
5. Select **Generate new key**.
37
-
6. Store your key securely where it can be accessed by your backend.
37
+
3. Select **Password**.
38
+
4. Enter a secure password.
39
+
5. Select **Save changes**.
38
40
</Step>
39
-
<Steptitle="Integrate Mintlify authentication into your login flow.">
40
-
Modify your existing login flow to include these steps after user authentication:
41
-
42
-
* Create a JWT containing the authenticated user's info in the `User` format. See [Sending Data](/authentication-personalization/sending-data) for more information.
43
-
* Sign the JWT with your secret key, using the EdDSA algorithm.
44
-
* Create a redirect URL back to the `/login/jwt-callback` path of your docs, including the JWT as the hash.
41
+
<Steptitle="Distribute access.">
42
+
Securely share the password and documentation URL with authorized users.
45
43
</Step>
46
44
</Steps>
47
45
48
-
### Example
49
-
50
-
Your documentation is hosted at `docs.foo.com` with an existing authentication system at `foo.com`. You want to extend your login flow to grant access to the docs while keeping your docs separate from your dashboard (or you don't have a dashboard).
51
-
52
-
Create a login endpoint at `https://foo.com/docs-login` that extends your existing authentication.
53
-
54
-
After verifying user credentials:
55
-
* Generate a JWT with user data in Mintlify's format.
56
-
* Sign the JWT and redirect to `https://docs.foo.com/login/jwt-callback#{SIGNED_JWT}`.
Your documentation is hosted at `docs.foo.com` and you need basic access control without tracking individual users. You want to prevent public access while keeping setup simple.
85
49
86
-
```python Python
87
-
import jwt # pyjwt
88
-
import os
50
+
**Create a strong password** in your dashboard. **Share credentials** with authorized users. That's it!
51
+
</Tab>
52
+
<Tabtitle="Mintlify Dashboard">
53
+
### Prerequisites
89
54
90
-
from datetime import datetime, timedelta
91
-
from fastapi.responses import RedirectResponse
55
+
* Your documentation users are also your documentation editors.
1. In your dashboard, go to [Authentication](https://dashboard.mintlify.com/settings/deployment/authentication).
193
151
2. Select **Full Authentication** or **Partial Authentication**.
194
-
3. Select **Mintlify Auth**.
195
-
4. Select **Enable Mintlify Auth**.
152
+
3. Select **JWT**.
153
+
4. Enter the URL of your existing login flow and select **Save changes**.
154
+
5. Select **Generate new key**.
155
+
6. Store your key securely where it can be accessed by your backend.
196
156
</Step>
197
-
<Steptitle="Add authorized users.">
198
-
1. In your dashboard, go to [Members](https://dashboard.mintlify.com/settings/organization/members).
199
-
2. Add each person who should have access to your documentation.
200
-
3. Assign appropriate roles based on their editing permissions.
157
+
<Steptitle="Integrate Mintlify authentication into your login flow.">
158
+
Modify your existing login flow to include these steps after user authentication:
159
+
160
+
* Create a JWT containing the authenticated user's info in the `User` format. See [Sending Data](/authentication-personalization/sending-data) for more information.
161
+
* Sign the JWT with your secret key, using the EdDSA algorithm.
162
+
* Create a redirect URL back to the `/login/jwt-callback` path of your docs, including the JWT as the hash.
201
163
</Step>
202
164
</Steps>
203
165
204
166
### Example
205
167
206
-
Your documentation is hosted at `docs.foo.com`and your team uses the dashboard to edit your docs. You want to restrict access to team members only.
168
+
Your documentation is hosted at `docs.foo.com`with an existing authentication system at `foo.com`. You want to extend your login flow to grant access to the docs while keeping your docs separate from your dashboard (or you don't have a dashboard).
207
169
208
-
**Enable Mintlify authentication** in your dashboard settings.
170
+
Create a login endpoint at `https://foo.com/docs-login` that extends your existing authentication.
209
171
210
-
**Verify team access** by checking that all team members are added to your organization.
211
-
</Tab>
212
-
<Tabtitle="Password">
213
-
<Info>
214
-
Password authentication provides access control only and does **not** support content personalization.
215
-
</Info>
172
+
After verifying user credentials:
173
+
* Generate a JWT with user data in Mintlify's format.
174
+
* Sign the JWT and redirect to `https://docs.foo.com/login/jwt-callback#{SIGNED_JWT}`.
216
175
217
-
### Prerequisites
176
+
<CodeGroup>
177
+
```ts TypeScript
178
+
import*asjosefrom'jose';
179
+
import { Request, Response } from'express';
218
180
219
-
* Your security requirements allow sharing passwords among users.
.setExpirationTime('10 s') // 10 second JWT expiration
198
+
.sign(signingKey);
237
199
238
-
Your documentation is hosted at `docs.foo.com` and you need basic access control without tracking individual users. You want to prevent public access while keeping setup simple.
0 commit comments