Live data from Hacker News

Ask HN: How do you start over with 2FA after losing your phone?

news.ycombinator.com

111–112 of 112 posts

Re: Ask HN: How do you start over with 2FA after losing your phone?

#111

Earlier quoted context omitted.

> if I select only one entry the QR code gets smaller in itself Does it block you from taking a screenshot? Maybe you could screenshot it and then zoom in the gallery app.

Yes, it blocks on purpose to take screenshots.

Maybe take a photo with the new device of the small screened old device displaying the QR code and zoom that photo, and then move the zoomed photo to somewhere that the new device's camera can try to scan it?

If you can get a copy of that QR code off of the small device using the photo trick, besides using it to import your accounts to Google Authenticator (GA) on your new device you might consider extracting the codes from the backup so you can store them someplace secure separately. That way you can use them to set up TOTP apps other than GA.

Here's how you could do that. First, you need to get the QR code from GA to something that can read the QR code and display its contents. The text in the GA code is otpauth-migration://offline?data=... where the ... part is apparently a base64 encoded Google protocol buffer.

Once you've got that otpauth-migration URL this program that showed up when searching for information on those URLs can help: otpauth [1].

  otpauth --link otpauth-migration://offline?data=...
will decode it and give you the otpauth://totp URLs that were in the original QR codes that you originally set up your accounts with.

  otpauth -qr --link otpauth-migration://offline?data=...
will generate a PNG file for each account, name after the account name and site name, and containing the QR code for the account.

Going forward, save those PNGs somewhere secure (I use an encrypted tar file). Any new accounts you set up save the QR codes for those as PNGs and add them to your collection. If you keep that collection up to date you will be able to readily handle any device updates or replacements readily or adding new TOTP apps.

[1] https://github.com/dim13/otpauth

Post reply on HN