Skip to content
Menu

Tutorial

Add sign-in with Kazibo

A guestbook where only signed-in people can write, then an app for your friends only. No login page, no passwords.

October 23, 2026 · 3 min read

Your guestbook is online, and anyone can write anything in it, under any name. You want everyone to sign in before writing, and their real name to show. Kazibo signs your visitors in with a code sent by email; your app has no passwords and no sessions to handle.

What you say

To your agent

Add sign-in to my guestbook: everyone can read, only signed-in people can write, and each message shows its author's name.

What happens

add sign-in to my guestbook: everyone can read, only signed-in people can writeI suggest Kazibo sign-in: your visitors sign in with a code sent by email, and the app has no passwords to handle. I'll set it to "optional", so the guestbook stays readable by everyone. Shall I?yessign-in set to optionaladding the "Sign in" link, reading the identitydeployinghttps://guestbook-k3j9x2m4qa.kazibo.app
  1. The agent suggests Kazibo sign-in before writing a single line of a system of its own.
  2. It sets the app's sign-in to optional: open to everyone, and those who sign in are recognized. The setting applies at once.
  3. It adds a "Sign in" link, which leads to /.kazibo/login.
  4. When someone writes, the app reads who they are from the request, and stores the message under their ID. With no identity, it offers to sign in.

What your visitors see

A click on "Sign in" leads to a Kazibo page that names your app. The visitor enters their email address, gets a code, types it. The first time, they give their name and agree that your app may know their name and address. Then they're back on the guestbook, signed in for 30 days.

They need no invitation: a Kazibo account is created by proving one's address.

An app for your friends only

To your agent

Make the app private: only lea@example.com, tom@example.com and sam@example.com can get in.

The agent switches sign-in to required: nobody gets in without signing in. Then it adds a single check, in front of every page of the app, that compares the person's address to the list. The list is kept as a secret in the app. Someone else can sign in, but the app tells them it's private.

To add someone, say "add nina@example.com to the list".

Who came

In the platform, the app's page has a "People" section: each person's name, address and last sign-in. You can sign someone out there.

Testing on your computer

On your computer there's no Kazibo in front of the app: nobody is signed in. The agent can play a test user by sending the identity itself; the real sign-in is tried on the app online.

For the curious: the code

Kazibo writes three headers on every request from a signed-in person. The app reads them, without asking anyone anything:

js
// The signed-in person's identity, or null.
function currentUser(req) {
  const id = req.headers["x-kazibo-user-id"];
  if (!id) return null;
  return {
    id, // store users by this ID, not by email
    email: decodeURIComponent(req.headers["x-kazibo-user-email"] || ""),
    name: decodeURIComponent(req.headers["x-kazibo-user-name"] || ""),
  };
}

app.post("/messages", (req, res) => {
  const user = currentUser(req);
  if (!user) return res.redirect("/.kazibo/login?next=/");
  db.addMessage(user.id, user.name, req.body.text);
  res.redirect("/");
});

For the private app, a single check, before every route:

js
const allowed = new Set((process.env.ALLOWED_EMAILS || "").toLowerCase().split(",").map((s) => s.trim()).filter(Boolean));
app.use((req, res, next) => {
  const email = decodeURIComponent(req.headers["x-kazibo-user-email"] || "").toLowerCase();
  if (!email || !allowed.has(email)) return res.status(403).send("This app is private.");
  next();
});

The reference: user sign-in.