The State of Docs Report 2025 is live! Dive in and see why docs matter more than ever:
Read the report
LogoLogo
ProductPricingLog inSign up
  • Documentation
  • Developers
  • Guides
  • Changelog
  • Help Center
  • Getting Started
    • GitBook Documentation
    • Quickstart
    • Importing content
    • GitHub & GitLab Sync
      • Enabling GitHub Sync
      • Enabling GitLab Sync
      • Content configuration
      • GitHub pull request preview
      • Commit messages & Autolink
      • Monorepos
      • Troubleshooting
  • Creating Content
    • Formatting your content
      • Inline content
      • Markdown
    • Content structure
      • Spaces
      • Pages
      • Collections
    • Blocks
      • Paragraphs
      • Headings
      • Unordered lists
      • Ordered lists
      • Task lists
      • Hints
      • Quotes
      • Code blocks
      • Files
      • Images
      • Embedded URLs
      • Tables
      • Cards
      • Tabs
      • Expandable
      • Stepper
      • Drawings
      • Math & TeX
      • Page links
      • Columns
      • Buttons
      • Icons
    • Reusable content
    • Broken links
    • Searching content
      • Search & Quick find
      • GitBook AI
    • Writing with GitBook AI
    • Version control
  • API References
    • OpenAPI
      • Add an OpenAPI specification
      • Insert API reference in your docs
    • Guides
      • Structuring your API reference
      • Adding custom code samples
      • Managing API operations
      • Describing enums
      • Integrating with CI/CD
  • Extensions reference
  • Publishing Documentation
    • Publish a docs site
      • Public publishing
      • Private publishing with share links
    • Site structure
      • Content variants
      • Site sections
    • Site customization
      • Icons, colors, and themes
      • Layout and structure
      • Extra configuration
    • Set a custom domain
    • Setting a custom subdirectory
      • Configuring a subdirectory with Cloudflare
      • Configuring a subdirectory with Vercel
    • Site settings
    • Site insights
    • Site redirects
    • Authenticated access
      • Enabling authenticated access
      • Setting up Auth0
      • Setting up Azure AD
      • Setting up AWS Cognito
      • Setting up Okta
      • Setting up OIDC
      • Setting up a custom backend
    • Adaptive content
      • Enabling adaptive content
        • Cookies
        • URL
        • Feature flags
        • Authenticated access
      • Adapting your content
      • Testing with segments
  • LLM-ready docs
  • Collaboration
    • Live edits
    • Change requests
    • PDF export
    • Inviting your team
    • Comments
    • Notifications
  • Integrations
    • Install and manage integrations
    • GitHub Copilot
  • Account management
    • Plans
      • Community plan
        • Sponsored site plan
      • Billing policy
    • Subscription cancellations
    • Personal settings
    • Organization settings
    • Member management
      • Invite or remove members
      • Roles
      • Teams
      • Permissions and inheritance
    • SSO & SAML
      • SSO Members vs non-SSO
  • Resources
    • GitBook UI
    • Keyboard shortcuts
    • Glossary
Powered by GitBook
LogoLogo

Resources

  • Showcase
  • Enterprise
  • Status

Company

  • Careers
  • Blog
  • Community

Policies

  • Subprocessors
  • Terms of Service
On this page
  • 1. Create a new application in Auth0
  • 2. Install and configure the Auth0 integration
  • 3. Configure Auth0 for Adaptive content (optional)

Was this helpful?

Edit on GitHub
  1. Publishing Documentation
  2. Authenticated access

Setting up Auth0

Set up an Auth0 login screen for visitors to your docs.

Last updated 1 hour ago

Was this helpful?

This guide takes your through setting up a protected sign-in screen for your docs. Before going through this guide, make sure you’ve first gone through Enabling authenticated access.

To setup your GitBook site with authenticated access using Auth0, the process looks as follows:

1

Create a new application in Auth0

Create an Auth0 application in your Auth0 dashboard.

2

Install and configure the Auth0 integration

Install the Auth0 integration and add the required configuration to your GitBook site.

3

Configure Auth0 for Adaptive content (optional)

Configure Auth0 to work with adaptive content in GitBook.

1. Create a new application in Auth0

Start by creating a new application in your Auth0 platform dashboard. This application will allow the GitBook Auth0 integration to request tokens to validate user identity before granting them access to your site.

  1. Sign in to your Auth0 dashboard.

  2. Head to Applications > Applications section from the left sidebar.

  3. Click on the + Create Application button, and give your app a name.

  4. Under the Choose an application type, select Regular Web Applications.

  5. In the Quickstart screen of the newly created app, select Node.js (Express) and then I want to integrated my app.

  6. You should then see a configuration screen like below. Click Save Settings And Continue.

  7. Click on the Settings tab.

  8. Copy and make note of the Domain, Client ID and Client Secret.

Please ensure that you have at least one connection enabled for your Auth0 application under the Connections tab.

2. Install and configure the Auth0 integration

Once you've created the Auth0 application, the next step is to install the Auth0 integration in GitBook and link it with your Auth0 application using the credentials you generated earlier:

  1. Navigate to the site where you've enabled authenticated access and want to use Auth0 as the identity provider.

  2. Click on the Integrations button in the top right from your site’s settings.

  3. Click on Authenticated Access from the categories in the sidebar.

  4. Select the Auth0 integration.

  5. Click Install on this site.

  6. After installing the integration on your site, you should see the integration's configuration screen:

  7. Enter the Domain, Client ID and Client Secret values you copied after creating the Auth0 application earlier. For Auth0 Domain, enter the Domain copied from Auth0 (make sure to prefix it with https://).

  8. (optional) Enable the Include claims in JWT token option at the bottom of the dialog if you have enabled your site for adaptive content.

  9. Copy and make note of the Callback URL displayed at the bottom of the dialog.

  10. Click Save.

  11. Head back to the Auth0 application you created earlier in the Auth0 dashboard.

  12. Browse to Applications > Applications in the sidebar and select the Settings tab.

  13. Scroll down to the Application URIs section of the settings

  14. Paste the Callback URL you copied earlier from the GitBook integration dialog into the Allowed Callback URL input field.

  15. Click Save.

  16. Head back to Auth0 integration installation screen in GitBook.

  17. Close the integration dialogs and click on the Settings tab in the site screen.

  18. Browse to Audience and select Authenticated access (if not already selected).

  19. Select Auth0 from the dropdown in the Authentication backend section.

  20. Click Update audience.

  21. Head to the site's overview screen and click Publish if the site is not already published.

Your site is now published behind authenticated access using your Auth0 as identity provider.

To test it out, click on Visit. You will be asked to sign in with Auth0, which confirms that your site is published behind authenticated access using Auth0.

3. Configure Auth0 for Adaptive content (optional)

To leverage the Adaptive Content capability in your authenticated access site, configure the Auth0 application to include additional user information in the authentication token as claims.

These claims, represented as key-value pairs, are passed to GitBook and can be used to adapt content dynamically for your site visitors.