Ask or search…
Comment on page

Visitor Authentication

Set up custom authentication for your published content.
This feature is currently accessible to all Pro and Enterprise customers. If you are interested in the Enterprise plan, please contact [email protected] for a quote.
Visitor Authentication allows you to publish your content while requiring authentication from any visitors. When enabled, GitBook lets your server-side code handle who has access to the content.
In order to set up Visitor Authentication, you will need to create and host your own server to handle the authentication. Many different technologies can be used, but it’s up to you to code and maintain the solution you go with.

How it works

After enabling Visitor Authentication, your users will need to go through an authentication flow that validates the user before granting them access to the published content.
In the authentication process, your program will need to sign and return a JSON Web Token to the user, that can be successfully validated by GitBook in the form of a code.
Once the code has been validated, the user will have access to your published content.

Enable Visitor Authentication

In your space or collection, open the visibility menu and select Visitor Authentication.
Set up Visitor Authentication for your GitBook Space.
Once enabled, you’ll have access to a private signing key for this space. You will need this in the server you create to handle the authentication.
See the section below to find guides on setting up Visitor Authentication for some common providers.


Last modified 2d ago