Protect a site with a login
authPut a sign-in screen in front of a forever roost so visitors must authenticate. Pass tenantId plus an action:
• enable with mode: "password" and a password → ONE shared site password (everyone uses the same one). Best for a private demo or staging link.
• setPassword with a new password → rotate the shared password.
• disable → remove the login and serve the site publicly again.
• status → report whether auth is on and which mode.
Returns { enabled, mode, loginUrl }. Auth is only available on forever roosts — convert a free roost first. The sign-in screen lives at /__roost/login. Prefer password mode; useraccounts is unavailable (per-tenant databases are no longer provisioned).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | `password` = one shared site password (recommended). `useraccounts` is unavailable. Required when `action` is `enable`. | |
| action | No | What to do. Defaults to `status`. | |
| password | No | The shared site password (password mode only). Required for `enable` (password mode) and `setPassword`. | |
| tenantId | Yes | Tenant id from the original hatch response. | |
| sessionToken | No | Optional paired session token from poll_pairing (when Authorization headers are unavailable). |