Table of Contents
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.

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:
- Head to Settings > Access > Options
- Head to Restrict access and toggle Enabled Shared Password on
- Under Shared Password enter a password of your choice
- Click Save Changes
That's it! Now anyone visiting your site will need to enter the password before they can read any of your docs.

Using Team Passwords for Single Sign On
Team passwords work great when you need to set up docs that only users logged into your app can view.
Dropping the Cookie
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>
You can customize several parameters:
Query Parameter | Description | Default Value |
hd_team | Your shared team password |
|
duration | How long (in days) users with this cookie stay logged in |
|
redirect_uri | Where to redirect users after dropping a cookie (usually not needed for iframes) |
|
Redirecting Logged Out Users
When a user hasn't visited your site for a while, their cookie expires. You might want to override the default HelpDocs team password login page with a redirect to your own app.
Add this snippet to Settings > Code > Javascript:
<script type="text/javascript">
(function() {
if (window.location.pathname.indexOf('/team-login') === 0) {
// Parse query string parameters
var qs = function (a) {
if (a === '') return {};
var b = {};
for (var i = 0; i < a.length; i += 1) {
var p = a[i].split('=', 2);
if (p.length === 1) {
b[p[0]] = '';
} else {
b[p[0]] = decodeURIComponent(p[1].replace(/\+/g, ' '));
}
}
return b;
}(window.location.search.substr(1).split('&'));
var redirectUri = 'https://your-app.your-domain.com'; // Replace this with your login page URL
if (typeof qs.forward === 'string') redirectUri += '?hd_url=' + qs.forward; return window.location.href = redirectUri; }
})();
</script>
For a better user experience, your developers can set up a redirect back to the specific HelpDocs article after login by extracting the hd_url
query parameter.
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"}
What did you think of this doc?
Using JWT Studio