Here is a BASH and OpenSSL implementation of a Time-Based One-Time Password generator for "emegency" if my phone is stolen or broken. All I need is a backup copy of the authenticator secrets. When setting up two-factor authentication, these codes are often displayed below the QR code.