Skip to main content
Pro plans include password authentication.Custom plans include all authentication methods.
Authentication requires users to log in before accessing your documentation. When you enable authentication, users must log in to access any content. You can configure specific pages or groups as public while keeping other pages protected.

Configure authentication

Select the handshake method that you want to configure.
Password authentication provides access control only and does not support content personalization.

Prerequisites

  • Your security requirements allow sharing passwords among users.

Set up

1

Create a password.

  1. In your dashboard, go to Authentication.
  2. Enable authentication.
  3. In the Password Protection section, enter a secure password
After you enter a password, your site redploys. When it finishes deploying, anyone who visits your site must enter the password to access your content.
2

Distribute access.

Securely share the password and documentation URL with authorized users.

Example

Your host your documentation at docs.foo.com and you need basic access control without tracking individual users. You want to prevent public access while keeping setup simple.Create a strong password in your dashboard. Share credentials with authorized users. That’s it!

Make pages public

When using authentication, all pages require authentication to access by default. You can make specific pages viewable without authentication at the page or group level with the public property.

Individual pages

To make a page public, add public: true to the page’s frontmatter.
Public page example
---
title: "Public page"
public: true
---

Groups of pages

To make all pages in a group public, add "public": true beneath the group’s name in the navigation object of your docs.json.
Public group example
{
  "navigation": {
    "groups": [
      {
        "group": "Public group",
        "public": true,
        "icon": "play",
        "pages": [
          "quickstart",
          "installation",
          "settings"
        ]
      },
      {
        "group": "Private group",
        "icon": "pause",
        "pages": [
          "private-information",
          "secret-settings"
        ]
      }
    ]
  }
}

Control access with groups

When you use OAuth or JWT authentication, you can restrict specific pages to certain user groups. This is useful when you want different users to see different content based on their role or attributes. Manage groups through user data passed during authentication. See User data format for details.
Example user info
{
  "groups": ["admin", "beta-users"],
  "expiresAt": 1735689600
}
Specify which groups can access specific pages using the groups property in frontmatter.
Example page restricted to the admin group
---
title: "Admin dashboard"
groups: ["admin"]
---
Users must belong to at least one of the listed groups to access the page. If a user tries to access a page without the required group, they’ll receive a 404 error.

How groups interact with public pages

  • All pages require authentication by default.
  • Pages with a groups property are only accessible to authenticated users in those groups.
  • Pages without a groups property are accessible to all authenticated users.
  • Pages with public: true and no groups property are accessible to everyone.
---
title: "Public guide"
public: true
---

User data format

When using OAuth or JWT authentication, your system returns user data that controls session length and group membership for access control.
type User = {
  expiresAt?: number;
  groups?: string[];
};
expiresAt
number
Session expiration time in seconds since epoch. When the current time passes this value, the user must re-authenticate.
For JWT: This differs from the JWT’s exp claim, which determines when a JWT is considered invalid. Set the JWT exp claim to a short duration (10 seconds or less) for security. Use expiresAt for the actual session length (hours to weeks).
groups
string[]
List of groups the user belongs to. Pages with matching groups in their frontmatter are accessible to this user.Example: A user with groups: ["admin", "engineering"] can access pages tagged with either the admin or engineering groups.