Google Authenticator and second device setup
Solution 1:
I only wanted to post this because though it is similar to @Achilleas's answer, there is an official answer from Google that is actually harder to find (cannot be linked to directly and has lower google search ranking) than this StackOverflow question:
Setting up Google Authenticator on multiple devices
You can set up Google Authenticator so that you can generate verification codes from more than one device.
Make sure that you have Google Authenticator downloaded on all devices that you want to use.
Go to the 2-Step Verification page.
If you've already set up Google Authenticator for your account, delete that account from Authenticator so you can start fresh. If you have not yet set up Google Authenticator, skip to the next step.
Follow directions as usual to set up 2-Step Verification for the mobile app, making sure to either scan the generated QR code or enter the generated secret key on all devices that you want to set up.
Check to make sure that all devices are working correctly by entering the verification codes from each device and clicking Verify. Then click Save.
Google Authenticator does not generate App Passwords. If you are prompted by an application for a new password after turning on 2-Step Verification, you must sign in using an App Password.
Note: If you have iOS 8.3 on your device, you will no longer have to use App passwords to use 2-Step Verification.
It makes no constraints on types of devices and by being from google the previous claim that it is officially unsupported no longer holds. Also, the Note regarding App passwords is actually a good qualifier if you own an device that is not updated to recent iOS releases.
Solution 2:
I did the following to get Google Authenticator which was already installed on an iPhone with iOS 14.6, added to a new iPad (no deleting of your account from authenticator needed, nor do you need to execute console commands) - this is really simple:
- With the app installed on both devices.
- Open the Google Authenticator App on the 'old' device.
- Click on the three dots in the right-top corner.
- Export Accounts / Continue and Authenticate on your device (touchID).
- Select all sites for which you are generating keys and click "Export".
- You now get the QR-code on screen.
- Open the Google Authenticator App on your 'new' device.
- Click the google "+" button in the bottom right corner and select "Scan QR" code.
- Give access to the camera, scan it.
- You are now generating access keys on both devices.
Solution 3:
I had this issue too a while back. My solution was to switch from Google Authenticator to Authy. It supports the same sites (since both GA and Authy use the same algorithm) and also has some extra features such as Sync, passcode lock and a browser plugin. (And it looks much nicer if you ask me).
Authy is free and works on iOS and Android.
(I have no affiliation with Authy, other than that I'm a happy user)
EDIT 2019-07-24: Actually, just use a password manager that can do OTP for you. It's safer than depending on SMS (like pointed out in the comments to this answer)