-
-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google Authenticator - Transfer/Export accounts #74
Comments
FYI there is a discussion about this feature here: #27 |
Great to see it is already in Mind. But the last comments were made in Aug 2021. I would love to try to contribute at this point maybe, but please brief me real quick, the QR code is being recognized in a picture, the payload is read, in this case protobuf need to be decoded and then the new TOTP is being saved. Could you give me some sort of flow chart what library/methods you use for what step and if they're client or server side. Then I would give myself a try on this. |
Ok, I am currently working on it. I got a big confusion out of my way, the migration format uses Percent-encoding. After that, it is decodeable with protobuf. Question to you @Bubka, should the conversion from |
Is this just a string conversion or is there some logic to implement? |
This comment was marked as outdated.
This comment was marked as outdated.
I am blind, there is an official package. I will make a sample script, then you can implement it at the right place in your vue fronted. |
The package is not needed. The The working code looks like this:
|
https://github.com/aronmal/2FAuth/commit/b61cf94f8080e80f1ea599fa83c6ddb02ff9f4bf in case you need the |
@Bubka 👀 |
Sorry it's a very busy week. I've prioritize the proxy Auth issues since Monday, I hope I could review this on Thursday. |
In this file you have a regex. I don't know much about php, so no plan how to disable this check, but because I'm familiar with typescript and react I found where (here and here) to implement the conversion in vue. So my request would be to not check with the regex, but just parse the decoded QR Code and then do a check in vue if it matches the regex, otherwise 'optauth-migration' regex, in that case convert it or then throw an error. |
And another question, you can export multiple accounts at the same time. You have an array,, but I would just hard code it to take the first in the array. |
Hi @aronmal I've been reading and testing around protobuf and an import feature past days. And at the end I think that the protobuf decoding has to be done by the back-end. The main reason is that 2FAuth has all its business logic implemented server-side, and exposes an API through the back-end capabilities. If the protobuf decoding is done by Vue then the API won't be able to provide an endpoint to import GoogleAuth data. Thanks to your previous contributions I was able to implement the protobuf decoding with PHP 👍🏻 |
OK, my Idea was like:
in the Start.vue and Create.vue. But when you can implement it in php it is also fine I guess. |
Sure, but it's not that simple. 2Fauth uses 2 different QR decoders, one for the live scan, run by Vue, and one for uploaded QRs, run by the back-end. Moreover, forcing the user to import a single account whereas Google Authenticator allows to export the whole accounts would result in a bad UX. It is also necessary to create a dedicated UI to handle specific messages during the import process, especially in case of treatment error. I'm working on it. |
FYI, I committed some changes to the The |
I will give it a try when I find time for it. Nice job! |
Is your feature request related to a problem? Please describe.
When transferring/exporting TOTPs from Google Authenticator, the QR code is not being recognised. This is due to Google Authenticator exporting format is encoded and can be decoded with a simple python script or this migration site which is also open source and generates a QR code to scan afterwards.
Describe the solution you'd like
An integrated converter when recognising
otpauth-migration://offline?data=...
pattern from the QR code and import the profile automatically.Describe alternatives you've considered
Using the simplified python script and manually add the TOTP to the 2fauth app or use the site and scan the resulting QR codes.
Additional context (scanned from Google Authenticator and then hold my fingers in front of the camera)
The text was updated successfully, but these errors were encountered: