Passwords are a liability. People reuse them, forget them and have to reset them, and the site that stores them has to guard them. We decided early not to have any. Here is how sign-in works instead, from the code box to the server check.
The sign-in box
You type your email. We send you a message with two things in it: a 6-digit code and a link. Type the code into the box, or open the link on the same device. Either one signs you in. If you've never been here before, the same steps create your account, so there's no separate "sign up."
The code box is built for phones. It asks the browser for a numeric keypad, lets the phone offer the code straight from the message, and ignores spaces or dashes if you paste something messy. A wrong or expired code gets a plain-English message, with a way to send a new one.
The reader at My Social Feed signs you in with the emailed link, and shows Google or Facebook buttons when we've switched them on. Same account, same people behind it.
One account, several places
We use Supabase Auth, the sign-in service that comes with our database, and talk to it directly from the page. No sign-in library to load. The result is a single Pass Muster account. The same person who keeps a reader list in My Social Feed is the person who owns a creator site on the account page, with their sites, subscriptions and receipts together.
One honest detail: each address keeps its own session in your browser. Signing in on the company site doesn't magically sign you in on the reader. It's the same account, signed in separately on each.
The session lives in your browser
When the code checks out, the service hands back two tokens: a short-lived access token and a longer-lived refresh token. We store them in your browser's local storage, along with when the access token expires. Think of it as a wristband for the evening plus a way to get a new wristband.
Before any request that needs you, the page asks: how much time is left? If it's under two minutes, it quietly trades the refresh token for a fresh pair first. You stay signed in without ever noticing. If that trade fails, we clear the session and show the sign-in box again, instead of leaving you stuck on a page that doesn't work.
If you arrive by the emailed link, the tokens come back in the web address. The page keeps them, asks the service who they belong to, and then immediately removes them from the address bar, so they don't end up in your history or a copied link.
The server never takes your word for it
Here is the part that matters most. The page can claim anything; a browser is yours to tamper with. So the billing function, the piece that starts checkout and shows your account, trusts nothing about who you are. For checkout, account and billing-portal requests, it does one thing first: it reads the token from the request and asks the auth service, "who is this?" No valid person, no action. The answer to a stranger is "Sign in first," and the page responds by clearing its stale session and showing the box.
Two small touches:
- The public key that every page carries is not a person. If a request shows up with only that key where a person's token should be, it's rejected on the spot.
- When you check out, the order is saved against the user ID and email the server learned from your token, not whatever the page said. A tampered page can't buy a site as someone else, or look at someone else's account.
The function is open to the internet on purpose, since Stripe's payment notices can't carry our key. So every action checks its own input, and Stripe's notices must carry a valid signature, with only five minutes of leeway. That lets Stripe's notices reach us without opening anything else.
A practical wrinkle
Email is the whole system, so email has to arrive. The sign-in service's built-in mailer sends only 2 emails an hour on the free plan, which is useless for real sign-ups. So sign-in mail is set up to go through a dedicated email-sending service instead.
No password to leak, no reset flow to build, and the one place that matters (the server) checks who you are every single time.
Want to see it? The creator sites pages use exactly this when you check out, and nothing else needs to be remembered.
← All posts