Two-factor codes, with a time lock

Login codes you can lock away until a date you choose.

Code Locker is a small Mac app for two-factor codes. Lock one, and you can’t sign in to that account until the date comes. Not in a weak moment. Not with a trick.

Download for Mac

Free · macOS 15 or newer · Apple silicon

The Code Locker icon: a graphite padlock with a glowing date on its display.
Try it — lock for

Opens on the date you pick · key no. —

01 — Why

For the accounts you want to stay out of.

Deleting an account is forever. Willpower lasts until about 11 pm. Code Locker is the middle road. You keep your way back in. It’s just locked until the date you picked.

  1. 1
    Add the account. Turn on two-factor login on the site, and put the setup key in Code Locker.
  2. 2
    Sign out. On your phone too.
  3. 3
    Lock the code. For an hour, a day, a few weeks. You choose.

Now the site asks for a code you can’t get. When the date comes, the code is back, like nothing happened.

Click a code to copy it. Right-click to lock it.

02 — How the lock works

The key doesn’t exist yet.

This is not a timer inside the app that you could reset. It’s real encryption, called a time lock. The key that opens it has not been made, and it won’t be until your date.

Newest key in the world

This is live. A new key comes out every 3 seconds. Each one has a number.

A lock for your date waits for key no. —. That’s many keys from now.

01

A public clock that makes keys

A network called drand puts out a new random number every 3 seconds. Each one works as a key. It’s run by groups around the world, like Cloudflare and EPFL. No single one of them can make a key early.

02

Your code is locked to a future key

You pick a date. The app works out which key will come out at that moment, and locks your secret so only that key opens it. Then it throws the open copy away.

03

The key shows up on time

When the moment comes, drand publishes the key. The app picks it up and your code is back. Until then the key isn’t hidden somewhere. It hasn’t been made.

03 — Opening it early

You’ll think of a way around it. It’s covered.

Future you is clever and motivated. So the lock doesn’t depend on anything on your Mac. Not the app, not the clock, not you.

  • Change the Mac’s clockThe app doesn’t ask the clock. It needs the key.
    Still locked
  • Dig through the app’s filesThe file only holds the locked version.
    Still locked
  • Rebuild the app from sourceThe code is open. There is no back door to take out.
    Still locked
  • Set up a new MacYour accounts come back from iCloud. Locks included.
    Still locked
  • Ask the person who made itNobody has the key. It doesn’t exist yet.
    Still locked
  • WaitThe only thing that works. It opens by itself.
    Opens

04 — Good to know

The honest small print.

A lock can’t be undone
Or made shorter. That’s the whole point. Check the date before you click Lock.
Don’t keep a spare key
If the setup key or backup codes are saved somewhere else, the lock does nothing.
It needs internet to open
The app has to fetch the key when the time comes.
Your accounts live in your iCloud
Lose your Mac, sign in on a new one, and they come back. Locked ones still open on time.
Unlocked codes are not encrypted by the app
They sit in iCloud as plain text. Turn on Advanced Data Protection if you want only your own devices to read them.
Old backups remember
A Time Machine backup from before you locked can still hold the open secret.
Very long locks are a bet
They need drand to still be running when they end. And the time-lock library, tlock, has not been audited.
Free and open source
MIT license. Read every line on GitHub.

Lock one for a day. See how it feels.

Download Code Locker

Free · macOS 15 or newer · Apple silicon

Unzip it and drag it to Applications. It keeps itself up to date after that.