NookDocs supports three access modes per project:
| Mode | What happens | Plan |
| Public | Anyone with the URL reads every page. Default. | Free + |
| Site password | Visitors enter a shared password on first visit; cookie keeps them signed in for 30 days. | Pro + |
| Per-page private | Only pages with private: true in their MDX frontmatter require the password — the rest stay public. | Pro + |
Where to manage
Project → Settings → Access. Pick a mode, set or rotate the password, save.
The password is stored as a PBKDF2-SHA256 hash with a per-row salt — we never see the plaintext after submit.
How the gate works
When a tenant request comes in:
The docs renderer looks up the project's
access_mode.sitemode: every request checks for a validnook_accesscookie. Missing or expired → redirect to/access-gate?next=<url>&reason=site-gate.pagemode: only checks the cookie when the requested page's frontmatter hasprivate: true. Public pages stay public.Login:
/access-gateshows a password form. POST to/api/v1/projects/<id>/access/loginsets the cookie and returns the visitor to the original URL.Cookie binding: the cookie's signature uses the password hash as the HMAC key. Rotating the password invalidates every outstanding cookie immediately — no separate revocation step.
Marking a page private
In page-level mode, drop the flag into your frontmatter:
---
title: Internal API Reference
private: true
---
# Internal API
This page only loads for visitors who have entered the site password.Pages without private: true continue to render publicly.
Cookie details
| Name | nook_access |
| Scope | Set on the tenant's domain (subdomain or custom domain) |
| TTL | 30 days |
| Flags | HttpOnly, Secure, SameSite=Lax |
| Signature | HMAC-SHA256 of <projectId>.<expiry> keyed by the password hash |
Rotating the password breaks every cookie — useful when revoking access.
Plan availability
| Plan | Site password | Per-page private |
| Free | — | — |
| Pro | ✅ | ✅ |
| Team | ✅ | ✅ |
| Enterprise | ✅ | ✅ |
Notes
This is a shared-password gate, not per-user authentication. SSO + per-user identity for docs ships in the Enterprise SSO release.
Search engine crawlers stop at
/access-gate— gated docs are effectivelynoindex.Free tier visitors still see the docs because Free defaults to public; downgrading from Pro keeps the existing mode + hash working until you switch back to public.