Setting up Auth0
Set up an Auth0 login screen for visitors to your docs.
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 visitor authentication”.
To setup your GitBook site with visitor authentication using Auth0, the process looks as follows:
Create a new Auth0 application
First, sign in to Auth0 platform and create a new application (or use an existing one) by clicking the Applications button in the left sidebar. If creating a new application, name it appropriately and choose "Regular Web Application" as the option. Click Create. You may need to be admin to follow along this guide.

A quickstart panel will show up. Select Node.js (Express) option and then select "I want to integrate my app." You will see a screen prompting you to configure Auth0. It should look like the image below

Click on Save Settings And Continue.
Click on Settings next to Quickstart, and make a note of the Domain, Client ID, and Client Secret. We will need these to configure our Auth0 Visitor Authentication Integration.
Please ensure at least one connection is enabled for your Auth0 application.

Install and configure the Auth0 integration
Navigate to the Integrations tab in a site and locate the Auth0 integration or navigate directly to this https://app.gitbook.com/integrations/VA-Auth0.

Install the integration on your site.
Upon installation on site, you will see a modal asking you enter the Client ID, Auth0 Domain, and Client Secret.

For Client ID and Client Secret, paste in the value you copied from Auth0 Dashboard. For Auth0 Domain, enter the Domain copied from Auth0 (make sure to prefix it with https://
) .
Click Save.
Copy the URL displayed in the modal and enter it as an Allowed Callback URL in Auth0 (shown in the second screenshot in this guide). Hit Save
Now, in GitBook, close the integrations modal and click on the Manage site button. Navigate to Audience, select Visitor Authentication, and choose Auth0 as the backend. and click Update audience. Go to the site's screen and click Publish. The site is now published behind Visitor Authentication controlled by your Auth0 application. To try it out, click on Visit. You will be asked to sign in with Auth0, which confirms that your site is published behind Visitor Authentication using Auth0.
Configure Auth0 for adaptive content
This feature is still under development and coming soon.
Please sign up for the waitlist at https://www.gitbook.com/
Last updated
Was this helpful?