Skip to content

Data and privacy

Keyhaw stores a random ID for each user, along with their passkeys, backup codes, and sessions, and no email address, username, or profile. A user signs in with a passkey alone, so Keyhaw never has a way to contact them. This page lists every piece of data Keyhaw keeps about the people who sign in to your app, how long each piece stays, and what Keyhaw never collects, so you can tell your own users the truth about it.

Keyhaw keeps your users in your instance’s own records. Nothing links one instance to another, so an instance never sees another instance’s users.

If your app needs an email address or a username, keep it in your own system and link it to the user ID Keyhaw gives you. Keyhaw never sees it.

Each user has one record.

Data How long it stays
A random user ID that Keyhaw generates. It is also the handle the user’s passkeys carry. Until the user is deleted
Whether the user is active or suspended Until the user is deleted
When the record was created and last changed Until the user is deleted
The ID of the instance the user belongs to Until the user is deleted

A user holds any number of passkeys. Keyhaw stores the public half of each one and never the private half, which stays on the user’s device or in their passkey manager.

Data How long it stays
The passkey’s ID Until the user removes the passkey or is deleted
The user and instance the passkey belongs to Until the user removes the passkey or is deleted
The passkey’s public key Until the user removes the passkey or is deleted
A counter that the device raises on each sign-in, which Keyhaw uses to spot a cloned passkey Until the user removes the passkey or is deleted
Whether the passkey lives on one device or can sync across several, and whether it is currently backed up Until the user removes the passkey or is deleted
How the device connects, such as USB or Bluetooth, so the browser can offer the right prompt Until the user removes the passkey or is deleted
The authenticator’s model ID, which Keyhaw turns into a provider name such as the passkey manager’s when it lists the passkey Until the user removes the passkey or is deleted
When the passkey last signed in Until the user removes the passkey or is deleted
Whether a backup code added the passkey Until the user removes the passkey or is deleted
When the user dismissed the notice that a backup code added the passkey, which is empty otherwise Until the user removes the passkey or is deleted
When the record was created and last changed Until the user removes the passkey or is deleted

A signed-in user can generate backup codes, which add a passkey on a new device. Keyhaw stores each code as its own record, and stores a digest of the code, never the code itself.

Data How long it stays
A record ID An unused code stays until the user voids it or generates a new set. A used code stays until the user is deleted.
The user and instance the code belongs to The same
A digest of the code, which cannot be turned back into the code The same
When the code’s set was generated The same
When the code was used, which is empty while the code still works The same

A sign-in creates a session. The refresh token that proves it lives in the user’s browser, and Keyhaw stores only a hash of it.

Data How long it stays
A session ID 30 days after the session expires
The user, instance, and passkey that signed in 30 days after the session expires
A hash of the refresh token, which cannot be turned back into the token 30 days after the session expires
When the session was created, last used, and when it expires 30 days after the session expires
When the user signed out or Keyhaw revoked the session, which is empty otherwise 30 days after the session expires

By default a session lasts 7 days from its last refresh and never more than 30 days from sign-in. Once it expires, keyhaw-expired-session-cleaner deletes the record after a further 30 days, which lets Keyhaw tell a reused token from an unknown one while the difference matters.

Keyhaw keeps a complete record of the few sign-in outcomes an instance owner may need to act on. It writes one when a passkey’s counter fails to advance, when a registration comes from a blocked authenticator model, and when a backup code adds a passkey.

Data How long it stays
A record ID and the instance Until the user is deleted
The user and passkey involved, when the sign-in got far enough to know them Until the user is deleted
Which of the three outcomes happened Until the user is deleted
What the failure compared, such as the stored and reported counter or the blocked authenticator model Until the user is deleted
When it happened Until the user is deleted

A security event does not disappear when its user or passkey does, because it refers to them by ID only.

An instance’s blocklist names an authenticator model, a user, or a passkey that the instance refuses. Sign-in itself never adds an entry, so a user has a row here only if someone added one that names them.

Data How long it stays
A record ID and the instance Until the entry is removed
The blocked authenticator model, user, or passkey, whichever the entry names Until the entry is removed
The reason recorded for the block, and who recorded it Until the entry is removed
When the entry was created and last changed Until the entry is removed

Two kinds of data exist for minutes or an hour and then go, and are not part of the records above.

  1. A sign-in or registration challenge, the random value the passkey signs, exists for 60 seconds.
  2. Counts of wrong backup codes, kept per instance and per client, hold timestamps only, and empty themselves within the hour. They limit guessing. A client’s count is named by a hash of its address, never the address itself.

Keyhaw is built on the least-data tenet, so it collects none of the following.

  • A password. Keyhaw offers passkeys only, so no user has one to leak.
  • A passkey’s private key, or any biometric. Both stay on the user’s device.
  • An email address, a username, a name, a phone number, an address, a birth date, or any profile field. Keep these in your own system if your app needs them.
  • A social login or any account at another provider.
  • A user’s IP address in a table, a log line, or an Analytics Engine data point. The only trace is the hash that names a client’s count of wrong backup codes, which empties within the hour.
  • A user’s user agent, location, or device fingerprint.
  • An advertising or tracking cookie. The only cookie Keyhaw sets holds a signed-in session.
  • A backup code or a refresh token. Keyhaw stores a hash or digest of each and nothing it could turn back into the value.

A name you pass for a passkey stays in the browser, so Keyhaw never receives or stores it.

Keyhaw’s logs identify a user by user ID alone. A log line never carries an email address, a hash of one, an IP address, a token, or a cookie, and an error response never does either.

Keyhaw sends one data point to Cloudflare Workers Analytics Engine for every registration and sign-in, whether it succeeds or fails. The data point holds these fields and no others, plus the timestamp Analytics Engine adds.

Field Value
Instance The instance’s ID
Event type register or login
RP ID The instance’s RP ID, such as example.com, or localhost for a local instance
Outcome success or failure
Error code A fixed code such as verification_failed for a failure, and empty for a success
User ID Keyhaw’s internal user ID, and empty when the sign-in never found a user
Framework The framework adapter the request came through, such as astro, and empty when none named one
Count Always 1

The data point carries no passkey ID or IP address. Keyhaw keeps the user ID to diagnose a user’s failed sign-ins and to check the count, so it needs the user ID and nothing that names the person.

Analytics Engine keeps a data point for 90 days. A hard delete cannot remove a data point, so a deleted user’s ID stays in Analytics Engine until its 90 days pass. Everything else in this page stays in your instance’s own records.

Keyhaw counts each user who comes back at least a day after signing up, once per billing month. Keyhaw keeps which users counted in a month only until that month’s count is final. It keeps the count itself, which holds no user data, for as long as your account exists.

For each user who counts in a month, Keyhaw keeps one record.

Data How long it stays
The user’s ID, which a hard delete replaces with a random ID that names nobody Until the month’s count is final
The instance and the month Until the month’s count is final
The day in the month the user first counted Until the month’s count is final
Whether a visit that counted them ran on a domain RP ID, which bills them, rather than on localhost Until the month’s count is final

Export and hard delete work on one end user at a time, from the user’s detail page in the Keyhaw dashboard, and only the instance’s owner can run either.

To hand a user the data Keyhaw holds about them:

  1. Sign in to the Keyhaw dashboard and open the instance.
  2. Open the user from the instance’s list of users.
  3. Choose Export. Your browser downloads keyhaw-user-<user ID>.json, which you can send to the user.

An export is one JSON file. It holds the user’s record, each passkey’s details and public key, the count and creation times of the user’s backup codes, each session’s creation and expiry, and the user’s security events. It holds no hash of a backup code or token, and nothing about any other user.

A hard delete cannot be undone. To erase a user and the records that name them:

  1. Sign in to the Keyhaw dashboard and open the instance.
  2. Open the user from the instance’s list of users.
  3. Choose Delete user, type the user ID, and confirm. The dashboard returns to the list of users.

The user’s sessions end with the delete, and a browser already signed in loses access when its access token expires, within 10 minutes. The user can come back only by signing up again as a new account.

A hard delete removes every record that names the user. That covers the user, passkeys, backup codes, and sessions, plus the user’s security events and their blocklist entries. A user who counted in a month whose count is not final stays counted in that month under a random ID that names nobody.

A hard delete leaves the user’s data points in Analytics Engine, which expire after 90 days as described above. Once Keyhaw supports user lifecycle webhooks, a delete sends a user.deleted event that carries only the user ID.