Skip to content

Import from Google Authenticator

Rookiestyle edited this page Feb 4, 2022 · 4 revisions

Google Authenticator uses its own format to export entries and as of today, only offers the option to display a QR code containing the exported data.

Importing these data into KeePassOTP is a bit cumbersome due to that

1 - Export data

In Google Authenticator, use the app's menu to migrate your accounts.
The app let's you select multiple accounts, starting with version v0.18 KeePassOTP let's you pick one of the identified accounts.

Google Authenticator will display a QR code which is intended to be used by Google Authenticator on a 2nd device but can be handled by KeePassOTP as well.

2 - Copy exported data

You have to bring this QR code to the device where you run KeePass with KeePassOTP installed.
This can be done using multiple options. I can only mention a few of them and I can't ensure that they will work forever.
It's up to you, to find a working way that suits your need.

Option 1

Use a QR code scanner on a different device to convert the QR code into text.
If the text starts with otpauth-migration://offline?data= it's correct

If required, send this text to the device with KeePass and KeePassOTP installed. You might consider sending this in an encrypted way...

Option 2

You can try scrcpy if you're using an Android phone.
This tool will help you mirroring your Android phone's screen to your computer and you can save the QR code as image there.

Starting with Android 12, scrcpy can no longer mirror GoogleAuthenticator.

3 - Add data to KeePassOTP

Select the target entry in your KeePass database and set up OTP data as usual.

Either insert the entire otpauth-migration://offline?data= string into the text field or drag&drop the previously saved picture of the QR code.
The data will be converted into the standard otpauth format and you're finally done.

Example

Setup

This image is the QR coded version of following string: otpauth-migration://offline?data=CkMKFD3GyqSCSm0oh2eyMx4gtDFmy4XZEhxBQ01FIENvOmpvaG4uZG9lQGV4YW1wbGUuY29tGgdBQ01FIENvIAEoATACCjUKCkhlbGxvId6tvu8SGEV4YW1wbGU6YWxpY2VAZ29vZ2xlLmNvbRoHRXhhbXBsZSABKAEwAhABGAEgACjn4Pv4Ag%3D%3D

This represents two OTP sets

  1. otpauth://totp/ACME%20Co:[email protected]?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ&issuer=ACME+Co
  2. otpauth://totp/Example:[email protected]?secret=JBSWY3DPEHPK3PXP&issuer=Example

KeePassOTP will let you decide which entry to use