> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/publish/site-audience/authenticated-access/enabling-authenticated-access.md).

# Enabling authenticated access

To protect your docs behind a sign-in screen, you’ll need to first enable authenticated access for your site.

### Enable authenticated access

Head to your [site’s settings](/docs/manage-your-site/site-settings.md), and choose **Authenticated access** from your site’s audience settings. Once selected, you’ll see a few options you’ll need to continue configuring your site. You’ll also see a generated "**Private key**", which you’ll need at a later point in the authenticated access setup.

### Choose an authentication method

Depending on your setup, we have integrations and guides on setting up authenticated access for different tools.

Head to the relevant guide to continue setting up authenticated access for your site.

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="image">Cover image</th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover-dark data-type="image">Cover image (dark)</th></tr></thead><tbody><tr><td>Setting up Auth0</td><td><a href="https://1050631731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FvVHZQE8gGhXUKSao8ppc%2FAuth0.png?alt=media&amp;token=cc32e729-9b69-40ee-b2a7-8a101c34ed30">25_12_10_auth0_1.png</a></td><td><a href="/docs/publish/site-audience/authenticated-access/setting-up-auth0.md">Setting up Auth0</a></td><td><a href="https://1050631731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FcsSVFt516qxTm4HvE7b0%2FAuth0.png?alt=media&amp;token=f094b5c4-bf7e-4dd5-a258-ae192a938c01">25_12_10_auth0.png</a></td></tr><tr><td>Setting up Azure AD</td><td><a href="https://1050631731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FWQrMvQLbPoHKDjRJxO1f%2FAzure.png?alt=media&amp;token=63905032-607a-4817-9b1a-e1076b22cd0b">25_12_10_azure_1.png</a></td><td><a href="/docs/publish/site-audience/authenticated-access/setting-up-azure-ad.md">Setting up Azure AD</a></td><td><a href="https://1050631731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fv31LP38AFb2k72uKDrcn%2FAzure.png?alt=media&amp;token=c518f50e-7293-4549-ba56-4354daa3906f">25_12_10_azure.png</a></td></tr><tr><td>Setting up Okta</td><td><a href="https://1050631731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FjEaJJWUqrRwFvHstoDEg%2FOkta.png?alt=media&amp;token=48ca7133-d722-4d9f-a0b5-f77344dde93c">25_12_10_okta_1.png</a></td><td><a href="/docs/publish/site-audience/authenticated-access/setting-up-okta.md">Setting up Okta</a></td><td><a href="https://1050631731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FE1Kh6s9dW1kozmbh1s2T%2FOkta.png?alt=media&amp;token=cd7e903b-426d-470c-8d3e-e30bdf715712">25_12_10_okta.png</a></td></tr><tr><td>Setting up AWS Cognito</td><td><a href="https://1050631731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FwjoOkuIK3HAONhbOt05o%2FAWS%20Cognito.png?alt=media&amp;token=191b4e74-7a93-4017-afc8-46d055100f54">25_12_10_aws_cognito_1.png</a></td><td><a href="/docs/publish/site-audience/authenticated-access/setting-up-aws-cognito.md">Setting up AWS Cognito</a></td><td><a href="https://1050631731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2F4LMymAVpjWgNz9584JAS%2FAWS%20Cognito.png?alt=media&amp;token=246644bc-3512-41e9-8b5d-97a5d200f9b5">25_12_10_aws_cognito.png</a></td></tr><tr><td>Setting up OIDC</td><td><a href="https://1050631731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FaOx0yDe8XoWpRL9YVN16%2FOIDC.png?alt=media&amp;token=46288ec1-a08f-4968-95e2-0075be7347b3">25_12_10_oidc_1.png</a></td><td><a href="/docs/publish/site-audience/authenticated-access/setting-up-oidc.md">Setting up OIDC</a></td><td><a href="https://1050631731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FRkL0uaADK5pj6HG5ZkyB%2FOIDC.png?alt=media&amp;token=144a8f3f-60b7-4d5c-86fe-0868eebba0cc">25_12_10_oidc.png</a></td></tr><tr><td>Setting up a custom backend</td><td><a href="https://1050631731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2F18Q6ZoWDTYLP9MoLZHmo%2FCustom.png?alt=media&amp;token=cdacc6af-475d-4291-a03c-71b72c2a6f1d">25_12_10_custom_1.png</a></td><td><a href="/docs/publish/site-audience/authenticated-access/setting-up-a-custom-backend.md">Setting up a custom backend</a></td><td><a href="https://1050631731-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2FDGWWDcMZr00F6xwHii6b%2FCustom.png?alt=media&amp;token=f9e59aa6-937a-4d91-9c3b-ed8431e08d42">25_12_10_custom.png</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/publish/site-audience/authenticated-access/enabling-authenticated-access.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
