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
2. Select **Full Authentication** or **Partial Authentication**. 3. Select
35
+
**JWT**. 4. Enter the URL of your existing login flow and select **Save
36
+
changes**. 5. Select **Generate new key**. 6. Store your key securely where
37
+
it can be accessed by your backend.
35
38
</Step>
36
39
<Steptitle="Integrate Mintlify authentication into your login flow.">
37
-
Modify your existing login flow to include these steps after user authentication:
38
-
39
-
* Create a JWT containing the authenticated user's info in the `User` format. See [Sending Data](/authentication-personalization/sending-data) for more information.
40
-
* Sign the JWT with your secret key, using the EdDSA algorithm.
41
-
* Create a redirect URL back to the `/login/jwt-callback` path of your docs, including the JWT as the hash.
40
+
Modify your existing login flow to include these steps after user
41
+
authentication: * Create a JWT containing the authenticated user's info in
42
+
the `User` format. See [Sending
43
+
Data](/authentication-personalization/sending-data) for more information. *
44
+
Sign the JWT with your secret key, using the EdDSA algorithm. * Create a
45
+
redirect URL back to the `/login/jwt-callback` path of your docs, including
46
+
the JWT as the hash.
42
47
</Step>
43
48
</Steps>
44
49
@@ -49,15 +54,16 @@ Your documentation is hosted at `docs.foo.com` with an existing authentication s
49
54
Create a login endpoint at `https://foo.com/docs-login` that extends your existing authentication.
50
55
51
56
After verifying user credentials:
52
-
* Generate a JWT with user data in Mintlify's format.
53
-
* Sign the JWT and redirect to `https://docs.foo.com/login/jwt-callback#{SIGNED_JWT}`.
57
+
58
+
- Generate a JWT with user data in Mintlify's format.
59
+
- Sign the JWT and redirect to `https://docs.foo.com/login/jwt-callback#{SIGNED_JWT}`.
1. In your dashboard, go to [Authentication](https://dashboard.mintlify.com/settings/deployment/authentication).
132
-
2. Select **Full Authentication** or **Partial Authentication**.
133
-
3. Select **OAuth** and configure these fields:
134
-
***Authorization URL**: Your OAuth endpoint.
135
-
***Client ID**: Your OAuth 2.0 client identifier.
136
-
***Client Secret**: Your OAuth 2.0 client secret.
137
-
***Scopes**: Permissions to request. Use multiple scopes if you need different access levels.
138
-
***Token URL**: Your OAuth token exchange endpoint.
139
-
***Info API URL** (optional): Endpoint to retrieve user info for personalization. If omitted, the OAuth flow will only be used to verify identity and the user info will be empty.
<Steptitle="Create your user info endpoint (optional).">
147
-
To enable personalization features, create an API endpoint that:
148
-
* Accepts OAuth access tokens for authentication.
149
-
* Returns user data in the `User` format. See [Sending Data](/authentication-personalization/sending-data) for more information.
150
-
151
-
Add this endpoint URL to the **Info API URL** field in your [authentication settings](https://dashboard.mintlify.com/settings/deployment/authentication).
@@ -232,8 +247,9 @@ Password authentication provides access control only and does **not** support co
232
247
233
248
## Example
234
249
235
-
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.
There are three approaches to manage access and customize your documentation based on user information.
11
14
12
-
***Authentication**: Complete privacy protection for all content with full content customization.
13
-
***Partial authentication**: Page-by-page access control with full content customization.
14
-
***Personalization**: Content customization with **no security guarantees**. All content remains publicly accessible.
15
+
-**Authentication**: Complete privacy protection for all content with full content customization.
16
+
-**Partial authentication**: Page-by-page access control with full content customization.
17
+
-**Personalization**: Content customization with **no security guarantees**. All content remains publicly accessible.
15
18
16
19
**Choose authentication** if you need complete security and privacy for all your documentation, including pages, images, search results, and AI assistant features.
17
20
@@ -26,50 +29,55 @@ Authentication and personalization offer multiple handshake methods for controll
26
29
### Available for all methods
27
30
28
31
**JSON Web Token (JWT)**: Custom system where you manage user tokens with full control over the login flow.
29
-
* Pros of JWT:
30
-
* Reduced risk of API endpoint abuse.
31
-
* No CORS configuration.
32
-
* No restrictions on API URLs.
33
-
* Cons of JWT:
34
-
* Must be compatible with your existing login flow.
35
-
* Dashboard sessions and docs authentication are decoupled, so your team will log into your dashboard and your docs separately.
36
-
* 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.
32
+
33
+
- Pros of JWT:
34
+
- Reduced risk of API endpoint abuse.
35
+
- No CORS configuration.
36
+
- No restrictions on API URLs.
37
+
- Cons of JWT:
38
+
- Must be compatible with your existing login flow.
39
+
- Dashboard sessions and docs authentication are decoupled, so your team will log into your dashboard and your docs separately.
40
+
- 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.
37
41
38
42
**OAuth 2.0**: Third-party login integration like Google, GitHub, or other OAuth providers.
39
-
* Pros of OAuth 2.0:
40
-
* Heightened security standard.
41
-
* No restrictions on API URLs.
42
-
* Cons of OAuth 2.0:
43
-
* Requires significant work if setting up an OAuth server for the first time.
44
-
* Dashboard sessions and docs authentication are decoupled, so your team will log into your dashboard and your docs separately.
45
43
46
-
### Available for authentication and partial authentication
44
+
- Pros of OAuth 2.0:
45
+
- Heightened security standard.
46
+
- No restrictions on API URLs.
47
+
- Cons of OAuth 2.0:
48
+
- Requires significant work if setting up an OAuth server for the first time.
49
+
- Dashboard sessions and docs authentication are decoupled, so your team will log into your dashboard and your docs separately.
50
+
51
+
### Available for authentication and partial authentication
47
52
48
53
**Mintlify dashboard**: Allow all of your dashboard users to access your docs.
Copy file name to clipboardExpand all lines: authentication-personalization/partial-authentication-setup.mdx
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
title: "Partial authentication setup"
3
3
description: "Control access to specific pages"
4
4
icon: "file-lock-2"
5
+
keywords: ["auth"]
5
6
---
6
7
7
8
Partial authentication lets you protect private documentation while keeping other pages publicly viewable. Users can browse public content freely and authenticate only when accessing protected pages.
0 commit comments