Skip to main content
Support

Shared Password Protection

Whether you're using your HelpDocs internally to train staff, or just because they're not ready for the limelight yet, there's a load of reasons you might want to password protect your HelpDocs.

River Sloane
Updated by River Sloane
3 min read

Table of Contents

There are plenty of reasons you might want to password protect your HelpDocs Knowledge Base. Maybe you're using it internally for staff training or perhaps your docs aren't quite ready for public viewing yet.

Setting Up a Shared Password

Adding password protection to your Knowledge Base is super simple. Here's how to set up a shared password that visitors will need to enter before accessing your docs:

  1. Head to Settings > Sign-in & access
  2. Under Who can read your help center, choose Anyone with the shared password
  3. Under Shared password enter a password of your choice
  4. Click Save changes
New help centers stay private during the trial, so this choice is locked until you contact support.
Remember you'll need to share this password with your team, so avoid using anything that's personally sensitive to you βœ‹

That's it! Now anyone visiting your site will need to enter the password before they can read any of your docs. Team members who sign in to HelpDocs get straight in, and readers who've entered the password stay in until they've gone 30 minutes without loading a page.

Choosing a different option under Who can read your help center later removes the shared password.

The shared password protects your help center pages, not the Lighthouse widget. If Lighthouse is turned on, anyone with your widget key can read articles that aren't restricted to a group through it, without the password.
Password page with a Password field and a Login button

Using Team Passwords for Single Sign On

You can automatically log in users by sending the team password through as an hd_team query parameter. Example: your-domain.helpdocs.io/?hd_team=password

Team passwords work great when you need to set up docs that only users logged into your app can view.

The easiest approach is to load HelpDocs in an iframe on your dashboard when people log in. Include the team password in the query string to set a cookie that keeps them logged in.

Here's the basic URL structure:

https://<your-helpdocs>.helpdocs.io/_hd/team_sso?hd_team=<your-team-password>

Use this iframe snippet to get started:

<iframe src="https://<your-helpdocs>.helpdocs.io/_hd/team_sso?hd_team=<your-team-password>" width="0" height="0" style="display: none"></iframe>
Browsers that block or partition third-party cookies, such as Safari and Firefox, won't keep this cookie for later visits unless your docs and your app share a domain. If they don't, send people to the same URL with redirect_uri instead of using an iframe.

You can customize several parameters:

Query Parameter

Description

Default Value

hd_team

Your shared team password

undefined

duration

How long (in days) users with this cookie stay logged in

30

redirect_uri

Where to redirect users after dropping a cookie (usually not needed for iframes). Use a path or URL on your help center: anything else goes to your home page

undefined

To log a user out of HelpDocs, pass an empty string as the password or set the cookie duration to a negative value
If you use a custom domain, be sure to replace your HelpDocs subdomain with your custom domain in the URLs above

Passing User Data to Your Template

Want to identify users in your docs? You can pass user data in the URL query parameter when using an iframe or redirect.

The data should be JSON-encoded and sent as a hd_user_data query parameter:

https://helpdocs.your-custom-domain.com/_hd/team_sso?hd_team=password-here&hd_user_data={"name":"Taylor","user_id":"1"}

Need to access that data? Check out our guide on accessing user data in HelpDocs.

What did you think of this doc?

Previous Requiring SSO Next Configuring Slack Single Sign On