Skip to content

Commit 11fb743

Browse files
committed
Merge branch 'main' of https://github.com/mohab-sameh/docs
2 parents 91ee885 + 057a7e3 commit 11fb743

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+591
-159
lines changed

integrations/custom/css.mdx renamed to advanced/custom/css.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ footer {
2828

2929
Mintlify has a set of common identifiers to help you tag important elements of the UI. Some, but not all are listed in the following:
3030

31-
`#topbar-cta-button` `#navbar` `#sidebar` `#content-area` `table-of-contents`
31+
`#topbar-cta-button` `#navbar` `#sidebar` `#content-area` `#table-of-contents`
3232

3333
<Tip>
3434
Use inspect element to find references to elements you're looking to
File renamed without changes.

integrations/rest-api/overview.mdx renamed to advanced/rest-api/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Overview
2+
title: Introduction
33
---
44

55
<Check>
File renamed without changes.
File renamed without changes.

integrations/subpath/cloudflare.mdx renamed to advanced/subpath/cloudflare.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ title: "Cloudflare"
33
description: "Host documentation at a /docs subpath using Cloudflare Workers"
44
---
55

6-
<Info>
7-
**Prerequisite**: Your primary domain (company.com) is hosted on Cloudflare
8-
and you are on the [Mintlify startup plan or
9-
above](https://mintlify.com/pricing).
10-
</Info>
6+
import SubpathGatingSnippet from "/snippets/custom-subpath-gating.mdx";
7+
8+
<SubpathGatingSnippet />
119

1210
## Create Cloudflare Worker
1311

integrations/subpath/route53-cloudfront.mdx renamed to advanced/subpath/route53-cloudfront.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: 'Route 53 and Cloudfront'
3-
description: 'Host documentation at a /docs subdirectory using AWS services'
2+
title: "Route 53 and Cloudfront"
3+
description: "Host documentation at a /docs subdirectory using AWS services"
44
---
55

6-
<Info>
7-
**Prerequisite**: Your primary domain (company.com) is hosted on Route 53.
8-
</Info>
6+
import SubpathGatingSnippet from "/snippets/custom-subpath-gating.mdx";
7+
8+
<SubpathGatingSnippet />
99

1010
## Create Cloudfront Distribution
1111

@@ -15,7 +15,7 @@ Navigate to [Cloudfront](https://aws.amazon.com/cloudfront) inside the AWS conso
1515
![Cloudfront Create Distribution](/images/cloudfront/create-distribution.png)
1616
</Frame>
1717

18-
For the Origin domain, input `[SUBDOMAIN].mintlify.dev` where `[SUBDOMAIN]` is the project's unqiue subdomain. Click on `Use: [SUBDOMAIN].mintlify.dev`
18+
For the Origin domain, input `[SUBDOMAIN].mintlify.dev` where `[SUBDOMAIN]` is the project's unique subdomain. Click on `Use: [SUBDOMAIN].mintlify.dev`
1919

2020
<Frame>![Cloudfront Origin name](/images/cloudfront/origin-name.png)</Frame>
2121

integrations/user-auth/choosing-an-auth-method.mdx renamed to advanced/user-auth/choosing-an-auth-method.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Before your users can access personalized content, they must be authenticated. M
1212

1313
<Tabs>
1414
<Tab title="Shared Session">
15+
1516
- You have a dashboard or other user portal hosted at your domain.
1617
- Your users' session credentials are stored as cookies.
1718
- You can create a new API endpoint at the same origin or a subdomain of your dashboard.
@@ -22,6 +23,7 @@ Before your users can access personalized content, they must be authenticated. M
2223
- If your dashboard is at `*.foo.com`, your **docs** must be hosted at `foo.com` or `*.foo.com`
2324
</Tab>
2425
<Tab title="JWT">
26+
2527
- You have some existing login flow.
2628
- You can add a final step in this login flow that creates a JWT and redirects to the docs.
2729
</Tab>

integrations/user-auth/jwt.mdx renamed to advanced/user-auth/jwt.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ If you don’t have a dashboard, or if you want to keep your dashboard and docs
1616
- Authenticate the user
1717
- Create a JWT containing the authenticated user's info in the [UserInfo](./sending-data) format
1818
- Sign the JWT with the secret
19-
- Create a redirect URL back to your docs, including the JWT as a query parameter with the name `user_auth`
19+
- Create a redirect URL back to your docs, including the JWT as the hash
2020
</Step>
2121
<Step title="Configure your User Auth settings">
2222
Return to your [Mintlify dashboard settings](https://dashboard.mintlify.com/settings/integrations) and add the login URL to your User Auth settings.
@@ -27,6 +27,6 @@ If you don’t have a dashboard, or if you want to keep your dashboard and docs
2727

2828
I want to set up authentication for my docs hosted at `docs.foo.com`. I want my docs to be completely separate from my dashboard (or I don’t have a dashboard at all).
2929

30-
To set up authentication with Mintlify, I go to my Mintlify dashboard and generate a JWT secret. I create a web URL `https://foo.com/docs-login` that initiates a login flow for my users. At the end of this login flow, once I have verified the identity of the user, I create a JWT containing the user’s custom data according to Mintlify’s specification. I sign this JWT with my Mintlify secret, create a redirect URL of the form `https://docs.foo.com?user_auth={SIGNED_JWT}`, and redirect the user.
30+
To set up authentication with Mintlify, I go to my Mintlify dashboard and generate a JWT secret. I create a web URL `https://foo.com/docs-login` that initiates a login flow for my users. At the end of this login flow, once I have verified the identity of the user, I create a JWT containing the user’s custom data according to Mintlify’s specification. I sign this JWT with my Mintlify secret, create a redirect URL of the form `https://docs.foo.com#{SIGNED_JWT}`, and redirect the user.
3131

3232
I then go to the Mintlify dashboard settings and enter `https://foo.com/docs-login` for the Login URL field.

integrations/user-auth/overview.mdx renamed to advanced/user-auth/overview.mdx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Overview'
2+
title: 'Introduction'
33
description: 'Give your users a personalized docs experience'
44
---
55

@@ -13,7 +13,7 @@ User Auth allows you to configure a method for identifying and authenticating yo
1313

1414
1. **Customize MDX content** with a user's information, such as their name, plan, or title.
1515
2. **Prefill API keys** in the API Playground for streamlined use.
16-
3. <b className="text-primary">(Coming soon!)</b> **Selectively show pages** in the navigation based on a user's groups.
16+
3. **Selectively show pages** in the navigation based on a user's groups.
1717

1818
## What *isn't* User Auth
1919

@@ -22,29 +22,37 @@ At this time, User Auth cannot provide any of the following:
2222
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.
2323
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.
2424

25-
<Note>If you are interested in private docs content, [contact our team]([email protected]) to explore solutions.</Note>
25+
<Note>If you are interested in private docs content, [contact our team](mailto:[email protected]) to explore solutions.</Note>
2626

2727
## How to Use
2828

2929
### Customizing MDX Content
3030

31-
When writing content, you can use the `userContext` variable to access the information you have sent to your docs. Here's a real world example:
31+
When writing content, you can use the `userContext` variable to access the information you have sent to your docs. Here's a simple example:
32+
33+
Hello, {userContext.name ?? 'reader'}!
34+
35+
```jsx
36+
Hello, {userContext.name ?? 'reader'}!
37+
```
38+
39+
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:
3240
3341
User Auth is an enterprise feature. {
3442
userContext.org === undefined
3543
? <>To access this feature, first create an account at the <a href="https://dashboard.mintlify.com/login">Mintlify dashboard</a>.</>
3644
: userContext.org.plan !== 'enterprise'
37-
? <>You are currently on the ${userContext.org.plan ?? 'free'} plan. To upgrade, navigate to the <a href="https://dashboard.mintlify.com/settings/billing">billing page</a> in the Mintlify dashboard.</>
38-
: <>As an enterprise organization, you can enable this feature right now from your <a href="https://dashboard.mintlify.com/settings/integrations">Mintlify dashboard settings</a></>
45+
? <>You are currently on the ${userContext.org.plan ?? 'free'} plan. To speak to our team about upgrading, <a href="mailto:sales@mintlify.com">contact our sales team</a>.</>
46+
: <>To request this feature for your enterprise org, <a href="mailto:sales@mintlify.com">contact our team</a>.</>
3947
}
4048
4149
```jsx
4250
User Auth is an enterprise feature. {
4351
userContext.org === undefined
4452
? <>To access this feature, first create an account at the <a href="https://dashboard.mintlify.com/login">Mintlify dashboard</a>.</>
4553
: userContext.org.plan !== 'enterprise'
46-
? <>You are currently on the ${userContext.org.plan ?? 'free'} plan. To upgrade, navigate to the <a href="https://dashboard.mintlify.com/settings/billing">billing page</a> in the Mintlify dashboard.</>
47-
: <>As an enterprise organization, you can enable this feature right now from your <a href="https://dashboard.mintlify.com/settings/integrations">Mintlify dashboard settings</a></>
54+
? <>You are currently on the ${userContext.org.plan ?? 'free'} plan. To speak to our team about upgrading, <a href="mailto:sales@mintlify.com">contact our sales team</a>.</>
55+
: <>To request this feature for your enterprise org, <a href="mailto:sales@mintlify.com">contact our team</a>.</>
4856
}
4957
```
5058
@@ -55,7 +63,6 @@ User Auth is an enterprise feature. {
5563
### Prefilling API Keys
5664
5765
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.
58-
{/*
5966
### Showing/Hiding Pages
6067
6168
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.

0 commit comments

Comments
 (0)