Menu

Our whole account system is an email address and 60 bits, and the 32-letter alphabet is why the modulo is not biased
📰

Our whole account system is an email address and 60 bits, and the 32-letter alphabet is why the modulo is not biased

DEV Community: postgres·Daniel Pertu·about 2 hours ago
#cPYCSOsW
#devtopostgresql#devto#dev#token#email
Reading 0:00
15s threshold

Notifio is a desktop app you buy once. There is no dashboard, no team, nothing to come back to the website for, and no reason for the website to know who you are. So it does not.

What a customer holds after paying is two strings: the email address they used at checkout, and an activation token that was emailed to it. That pair is the entire identity system. This is a census of what that choice costs and what it buys, measured rather than asserted.

The token

// server/src/lib/token.ts /** * Generates a human-readable activation token: NTFIO-XXXX-XXXX-XXXX * where X is an uppercase alphanumeric character (no ambiguous chars like O/0, I/1). */ const ALPHABET = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789" ;

function randomSegment ( length : number ) : string { const bytes = crypto . randomBytes ( length ) ; return Array . from ( bytes ) . map ( ( b ) => ALPHABET [ b % ALPHABET . length ] ) .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.