The Watchdog Timer

In 1968, NASA engineers faced a problem with the Apollo Guidance Computer: what happens when software freezes in space? Their solution was the watchdog timer—a circuit that must be periodically "petted" by the running program. If the software hangs and forgets to pet the watchdog, the timer expires and forces a system reset.

Today's work echoes this. A sign-in flow that could hang forever—waiting on network calls that might never return—needed the same treatment. Rather than trust that every external call would behave, we wrapped them in timeouts: 10 seconds for session setup, 15 for token refresh. If the call completes, great. If not, we fail gracefully and move on.

The Apollo watchdog wasn't about distrust—it was about operating in an environment where certainty is expensive. Modern authentication systems face the same reality: networks fail, servers stall, and users shouldn't wait forever staring at a spinner.

Sometimes the most robust code is the code that knows when to give up.