Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Display QR code without generating a new secret key #564

Closed
ShmuelLevine opened this issue Aug 23, 2016 · 4 comments
Closed

Display QR code without generating a new secret key #564

ShmuelLevine opened this issue Aug 23, 2016 · 4 comments

Comments

@ShmuelLevine
Copy link

Presently, I have not found any way to persuade google-authenticator to display the QR code for my user account without having to generate a new secret key.

I've just recently gotten a new phone and while trying to set up google authenticator on the new phone, I was looking for a way to simplify adding this account to the mobile app without changing the secret key (which would have caused my other devices to stop working properly).

I am well aware that I can obtain the secret key from the ~/.google-authenticator file. However, given that there is already an interface with libqrencode and it works properly with a newly-generated key, I would like to see the same functionality made available to display an existing secret key as well.

@ThomasHabets
Copy link
Contributor

For now you can add this early in main and recompile:

displayQRCode("aaaaaaaaa", "label", 1, "issuer");

Marking this issue an enhancement to parse the config file and reprint. But this will only work for TOTP since I don't think the counter is part of the QR code that apps will read.

@ShmuelLevine
Copy link
Author

For now, I've just typed in the secret code manually....

Having said that, having come across this situation, it occurred to me that this would be a rather useful feature.

@ThomasHabets
Copy link
Contributor

This issue was moved to google/google-authenticator-libpam#1

@ITServ-DE
Copy link

For a workaround, see google/google-authenticator-libpam#1 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants