Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

Import FreeOTP tokens.xml file #2

Closed
pejakm opened this issue Jul 22, 2017 · 10 comments
Closed

Import FreeOTP tokens.xml file #2

pejakm opened this issue Jul 22, 2017 · 10 comments
Assignees

Comments

@pejakm
Copy link

pejakm commented Jul 22, 2017

How can I import my codes from FreeOTP? They are stored in a xml file, entries look like this:

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
    <string name="example@example:Example">{&quot;algo&quot;:&quot;SHA1&quot;,&quot;counter&quot;:0,&quot;digits&quot;:6,&quot;issuerExt&quot;:&quot;example@example&quot;,&quot;label&quot;:&quot;Example&quot;,&quot;period&quot;:30,&quot;secret&quot;:[98,-92,-87,46,76,-1,117],&quot;type&quot;:&quot;TOTP&quot;}</string>
    <string name="tokenOrder">[&quot;example@example:Example&quot;]</string>
</map>
@pejakm
Copy link
Author

pejakm commented Jul 22, 2017

I have tried this tool: http://tomeko.net/online_tools/base32.php?lang=en to convert FreeOTP's secret to hex and then entering it into andOTP, but it didn't reproduce the same code.

@flocke
Copy link
Member

flocke commented Jul 23, 2017

I have never used FreeOTP myself and I am currently not at home, but as soon as I return I will have a look.

@flocke flocke self-assigned this Jul 23, 2017
@flocke
Copy link
Member

flocke commented Jul 23, 2017

Could you upload an XML file with an example account for me?

Sent from my Google Nexus 5X using FastHub

@flocke flocke modified the milestones: v0.2.3, v0.2.4 Jul 25, 2017
@ghost
Copy link

ghost commented Jul 28, 2017

Using https://github.com/minus7/freeotp-export/blob/master/freeotp-export.py works for me, if you remove the part that's responsible for extracting the xml.
You can then generate QR codes based on the output of that script (otpauth://...)
There is also https://github.com/viljoviitanen/freeotp-export/blob/master/export.html which is in JS, that may be easier to implement. Those scripts convert FreeOTPs tokens.xml into a usable format.
The tokens.xml looks exactly as @pejakm pasted it.

@flocke
Copy link
Member

flocke commented Jul 28, 2017

I'm not sure yet if I want to add the option to import other formats to andOTP since I want to keep the app itself light.
A simple (online) solution that converts freeotp XML files to (encrypted) andOTP backup files would be the best in my opinion.

@pejakm
Copy link
Author

pejakm commented Jul 28, 2017

Could you upload an XML file with an example account for me?

Sorry, I missed this. First post contains example, just save it as tokens.xml.

@pejakm
Copy link
Author

pejakm commented Jul 28, 2017

I have managed to import my FreeOTP data to andOTP, thanks!

@ghost
Copy link

ghost commented Jul 30, 2017

So it might be worth more to get a script / local HTML file with JavaScript which can generate QR-Codes or the secrets from the strings.xml, didn't find something there

@flocke flocke removed this from the v0.2.4 milestone Jul 30, 2017
@flocke
Copy link
Member

flocke commented Aug 1, 2017

It would be nice if someone else could write a HTML/JavaScript approach to generate QR-Codes from the FreeOTP XML files.
I am not really familiar with HTML or Javascript ...

@flocke
Copy link
Member

flocke commented Aug 4, 2017

I submitted a pull request to https://github.com/viljoviitanen/freeotp-export adding a JavaScript file to export the tokens.xml file and generate QR codes from it.
As soon as it is merged I will close this issue and add it to the README file.

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

2 participants