Skip to content

Instantly share code, notes, and snippets.

@talk2bryan
Last active November 12, 2022 15:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talk2bryan/160cfc0c073990090d9117beda19871d to your computer and use it in GitHub Desktop.
Save talk2bryan/160cfc0c073990090d9117beda19871d to your computer and use it in GitHub Desktop.
Importing Authy TOTP seed codes to Standard Notes

Importing Authy TOTP seed codes to Standard Notes

Standard Notes is an application which allows end-to-end encrypted notes. These notes are synchronized through their servers to ensure that you can have your notes on each and all of your devices.

The draw of Standard Notes for me was the end-to-end encryption. No one besides me can see the contents of my notes. It is an open source application that has been well vetted for security, and user privacy.

A feature they provide is software-based 2FA solution. As someone who has used Authy for years, Standard Notes provides me with the ownership of my seed codes which Authy, by design does not allow. In order to retrieve my seed codes from Authy, I used this tutorial that generated a JSON file that looks like this.

# authy-to-bitwarden-export.json
{
    "encrypted": false,
    "folders": [
        {
            "id": "folderID",
            "name": "Imported from Authy"
        }
    ],
    "items": [
        {
            "id": "5d3-29e6-4676-77f",
            "organizationId": null,
            "folderId": "folderID",
            "type": 1,
            "reprompt": 0,
            "name": "GitHub:  talk2bryan",
            "notes": null,
            "favorite": false,
            "login": {
                "username": null,
                "password": null,
                "totp": "otpauth://totp/GitHub:  talk2bryan?secret=SECRET_STRING&digits=6&period=30&issuer=GitHub"
            },
            "collectionIds": null
        },
        ...
    ]
}

Then I used the following Python script to export the data to make them look like the following:

{
    "service": "GitHub", 
    "account": "talk2bryan", 
    "secret": "SECRET_STRING", 
    "notes": ""
}

Finally, I echoed all the OTPs discovered to the Terminal in a format that can be understood by the Standard Notes import tool by adding escape and new line feed characters.

Steps to achieve this

On Standard Notes:

  1. Create a new note, set the name to something reasonable, like "2FA". Remember this name
  2. Click on Open Preferences on the bottom left corner of the application window. This would open "Your preferences for Standard Notes" window
  3. Click on "Backups" on the left panel
  4. Select Decrypted and click "Download backup"

On Your Computer:

  1. Open the downloaded zipped file and open the file named "Standard Notes Backup and Import File.txt" on a Text editor.

  2. Search for the name of the note, like "2FA" in the screenshot. Standard Notes import file content

  3. In-between the empty quotes after "text", paste the output of the Python program and save the file.

Back onto Standard Notes:

  1. Click on Open Preferences on the bottom left corner of the application window. This would open "Your preferences for Standard Notes" window
  2. Click on "Backups" on the left panel
  3. Click on "Import backup"
  4. Select the "Standard Notes Backup and Import File.txt" file you just edited
  5. Enter your account password if prompted
  6. When the note has been imported, navigate the note
  7. You may see two copies. Feel free to delete the empty version.
  8. Select the non-empty version, Click on the menu -> Change note type -> Authenticator
  9. You should see all of your tokens.
  10. Optionally, sort all the tokens alphabetically.
  11. Lastly, I recommend password protecting this note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment