De-Googling TOTP Authenticator Codes

https://news.ycombinator.com/rss Hits: 4
Summary

Back to Articles 1st Sep 2025 In the ongoing effort to extricate myself from Google's services, I've been paring down my usage of their apps on my (admittedly Android) phone. I'm now down to two Google apps I use regularly: Maps (for traffic data) and Authenticator (for TOTP[A]Time-based One Time Password codes). Now, I spend most of my time in a terminal window on MacOS or connected to a Linux machine; it'd be nice if I could get TOTPs on the command-line, and it turns out there's a utility called oathtool that allows for TOTP generation on the CLI. However, that would mean switching my OTP provider, which usually involves: Logging into each service that has an OTP registered in the app; Disabling two-factor authentication (2FA); Re-enabling 2FA and using the "manual entry" code as input to oathtool; Doing it all again for the next website or service. Fortunately, Google's Authenticator provides a way to migrate codes between instances of the app based on scanning QR codes, and we can use this to migrate them away from Google into a TOTP handler of our choosing. It's another four-step process: Generating a QR code in Google Authenticator for the codes you want to export; Decoding the QR somewhere off-device, into a URL; Decoding the URL into its constituent services and secret values; Setting up oathtool to use the secrets. Note that the below steps are presented just as I went through them, you may be able to find efficiencies or you may run into troubles that I didn't (especially if you're trying this exclusively on Windows); "your mileage may vary" is apt here. Going from Authenticator to a migration URL The first step is getting the code out of Authenticator, through the Transfer Codes menu option in the app. Picking the services you'd like to extract leads you to a code like this: Figure 1: QR code exported from Google AuthenticatorUnrivalled padding between the QR and Next button You may have an app on your phone that decodes QRs, but I don't; instead, I tran...

First seen: 2025-09-01 10:47

Last seen: 2025-09-01 16:48