A visitor with no account

How dansabin.com keeps a chat yours with no login, through an anonymous signed identity, a key the browser can use but can't carry away, and data you can delete yourself.

case study · 2026
~/dansabin.com — chat Ask about this project

Key points

No login

A visitor gives no name, email or password to start chatting.

The identity

Passing the human check gives the visitor an anonymous signed token.

The device key

That token is bound to a key held in the browser, so a stolen token isn't enough on its own.

The trade-off

A chat belongs to that browser and doesn't follow the visitor to another device.

The problem

I don't want the barrier of entry to be so high. After all, it's a product I want people to use. I don't need their personal information, and it's a challenge to myself to design a solution that works without it. So visitors come in with no login, and the site generates a session for them. That leaves a question I had to ask of my own design: without some kind of user and password, how do we stop people stealing or hijacking each other's chats?

How a visitor gets an identity

  1. The visitor passes the WAF CAPTCHA, the one-time human check.
  2. The browser makes a key pair with Web Crypto, and the API issues a signed token bound to its public key.
  3. Every later request carries the token and a proof signed by the device key over that request, within 2 minutes of the system's clock.

A request with a token but no valid proof is rejected as if it had no token at all.

The key stays, the token travels After the human check, the browser makes a key pair and sends the public key, and the API issues a signed token bound to it. The private device key stays in the browser, non-extractable, in IndexedDB. Every later request carries the token and a proof signed by the device key, and the API accepts it. A stolen token sent from another browser has no valid proof, so the API rejects it as if it had no token at all. THE BROWSER device key non-extractable, in IndexedDB a script can use it, never carry it away token anonymous, signed THE API API checks the token and the proof WHAT TRAVELS public key, after the human check a signed token bound to it token and a proof signed by the device key accepted A STOLEN TOKEN another browser the token, no device key token, no valid proof rejected as if it had no token at all The key stays, the token travels After the human check, the browser makes a key pair and sends the public key, and the API issues a signed token bound to it. The private device key stays in the browser, non-extractable, in IndexedDB. Every later request carries the token and a proof signed by the device key, and the API accepts it. A stolen token sent from another browser has no valid proof, so the API rejects it as if it had no token at all. THE BROWSER device key non-extractable, in IndexedDB, never carried away token anonymous, signed token and a signed proof THE API accepted a proof signed by the device key A STOLEN TOKEN another browser the token, no device key token, no valid proof rejected as if it had no token at all
The device key never leaves the browser; only the token and a proof signed by that key travel with each request. A stolen token on its own brings no valid proof, so the API rejects it as if it had no token at all.

The device key

I want visitors to feel safe enough to use the project, and to know that only they and I can see their chats. The device key is what protects a visitor's chats from being hijacked.

The private key is created as non-extractable and kept in IndexedDB. A script on the page can use it but can never carry it away. So stealing the token gets an attacker nothing without the browser that holds the key.

This does lean on the visitor's device being the authentication and authorization layer. If I wanted more security, I'd need more information from them, and that's where the line is drawn.

Some private windows refuse IndexedDB. The key is then held in memory, the identity works until the visitor leaves or reloads the page, and the page says so.

Signing keys that rotate

The keys that sign tokens live in Secrets Manager and rotate every 14 days. The rule was that current, pending and past keys all work, so that authentication is never dropped by a rotation. Retired keys are kept for verification for 370 days, so a visitor returning within the retention period can renew the same identity. Signing keys replicate to the second region, so a token issued in one region is accepted in the other.

What a visitor can lose

What happensWhat the visitor gets
The token expires, and the browser still holds the keyPass the check again, and the same identity is renewed, with its chats and allowance
The browser loses the keyPass the check again, and get a new identity. Earlier chats can't be opened again
A private window closesIts chats end

A visitor who loses their chat when they switch devices is OK. It's proof of where the boundary is. A cross-device link is possible if that turns out to be important, but as it stands, this shows exactly how much information I don't keep. The site says so near the chat and in the privacy notice.

Sharing and keeping

Chats are saved per visitor in DynamoDB and S3. The API can make a read-only link to a chat, but the site has no control for it yet, so a visitor can't share a chat today. A visitor's whole set of chats is deleted after 1 year without a visit.

Deleting your data

A visitor who wants their data gone can't be asked for an ID they don't know, and I wouldn't know it either. So the privacy notice has a "Delete my data" control, which works from the browser that holds the identity. It deletes every chat, any share links to them and the contact details left in those chats.

A person asking by email is a different case, because I have to verify they own the address they want deleted. The privacy notice promises that within 30 days.

No IP addresses are stored with conversations.

Design decisions and trade-offs

DecisionChosen overWhyTrade-off
Anonymous identityAccountsA visitor can start with nothing, and I don't need their personal informationA chat can't follow a person to a second device
A device key bound to the tokenA token aloneA stolen token isn't enoughLosing the key loses the identity
Non-extractable key in IndexedDBA secret a script can readA script can use the key but not take itPrivate windows may hold it only in memory
Current, pending and past signing keysOne key at a timeA rotation never ends a live identityOld keys stay valid for verification for a long time

Want the details?

Ask the window anything this page skips.