Levminer / authme

Simple cross-platform two-factor (2FA) authenticator app for desktop.
https://authme.levminer.com
GNU General Public License v3.0
343 stars 30 forks source link

Export/Import of authme files does not work #301

Closed HarleySalas closed 3 months ago

HarleySalas commented 4 months ago

Before the bug report.

Authme/System information

Authme: 5.1.1

Tauri: 1.6.5 WebKit: 17.0

OS version: Linux Mint x64 21.3.0 Hardware info: AMD Ryzen 5 5600X 6-Core Processor 63 GB RAM

Release date: 2024. May 14. Build number: release.240514.110212

Created by: Lőrik Levente

Authme log

[AUTHME LOG] (2024. 06. 06. 14:23:41) Authme 5.1.1 release.240514.110212
[AUTHME LOG] (2024. 06. 06. 14:23:41) Path changed: /
[AUTHME LOG] (2024. 06. 06. 14:23:41) Path changed: /codes
[AUTHME LOG] (2024. 06. 06. 14:23:43) Path changed: /import
[AUTHME ERROR] (2024. 06. 06. 14:23:47) Failed to check for update: the platform `linux-x86_64` was not found on the response `platforms` object
[AUTHME LOG] (2024. 06. 06. 14:24:14) Path changed: /codes
[AUTHME ERROR] (2024. 06. 06. 14:24:14) Failed to generate TOTP code from secret
[AUTHME ERROR] (2024. 06. 06. 14:24:14) Unknown runtime error occurred: TypeError: undefined is not an object (evaluating 'te.names')
[AUTHME LOG] (2024. 06. 06. 14:24:20) Path changed: /import
[AUTHME LOG] (2024. 06. 06. 14:24:41) Path changed: /codes
[AUTHME ERROR] (2024. 06. 06. 14:24:41) Failed to generate TOTP code from secret
[AUTHME ERROR] (2024. 06. 06. 14:24:41) Unknown runtime error occurred: TypeError: undefined is not an object (evaluating 'te.names')
[AUTHME LOG] (2024. 06. 06. 14:24:47) Path changed: /import
[AUTHME LOG] (2024. 06. 06. 14:25:04) Path changed: /codes
[AUTHME LOG] (2024. 06. 06. 14:26:33) Path changed: /import
[AUTHME LOG] (2024. 06. 06. 14:32:00) Path changed: /codes
[AUTHME ERROR] (2024. 06. 06. 14:32:00) Failed to generate TOTP code from secret
[AUTHME ERROR] (2024. 06. 06. 14:32:00) Unknown runtime error occurred: TypeError: undefined is not an object (evaluating 'te.names')
[AUTHME LOG] (2024. 06. 06. 14:32:32) Path changed: /settings
[AUTHME LOG] (2024. 06. 06. 14:35:27) Path changed: /import
[AUTHME LOG] (2024. 06. 06. 14:35:34) Path changed: /codes
[AUTHME ERROR] (2024. 06. 06. 14:35:34) Failed to generate TOTP code from secret
[AUTHME ERROR] (2024. 06. 06. 14:35:34) Unknown runtime error occurred: TypeError: undefined is not an object (evaluating 'te.names')
[AUTHME LOG] (2024. 06. 06. 14:37:30) Path changed: /import
[AUTHME LOG] (2024. 06. 06. 14:37:30) Path changed: /export
[AUTHME LOG] (2024. 06. 06. 14:37:31) Path changed: /codes
[AUTHME LOG] (2024. 06. 06. 14:37:33) Path changed: /edit
[AUTHME ERROR] (2024. 06. 06. 14:37:36) Unknown runtime error occurred: TypeError: null is not an object (evaluating 'oe.readOnly=!1')
[AUTHME ERROR] (2024. 06. 06. 14:37:40) Unknown runtime error occurred: TypeError: null is not an object (evaluating 'oe.readOnly=!0')
[AUTHME ERROR] (2024. 06. 06. 14:37:41) Unknown runtime error occurred: TypeError: null is not an object (evaluating 'oe.readOnly=!1')
[AUTHME ERROR] (2024. 06. 06. 14:37:41) Unknown runtime error occurred: TypeError: null is not an object (evaluating 'oe.readOnly=!0')
[AUTHME ERROR] (2024. 06. 06. 14:37:41) Unknown runtime error occurred: TypeError: null is not an object (evaluating 'oe.readOnly=!1')
[AUTHME LOG] (2024. 06. 06. 14:37:42) Path changed: /settings

Describe the bug

On my windows 11 harddrive (on the same hardware), I exported my auth codes successfully, without encryption.

Upon trying to import the export.authme file, I get an error:

Failed to generate TOTP code from secret.
Make sure you import file is correct!

note: the above error has a typo. It should be your instead of you.

Upon closing that error window, I get another box that says:

Codes imported.
You can edit your codes on the edit page.

However, they are not imported.

To reproduce

export code without encryption. import the resulting file.

Additional information

No response

Levminer commented 3 months ago

Thats strange!

It looks like there is a problem with a 2FA name (which is the description) There is a codes entry in the export.authme file. You can decode it at: https://www.base64decode.org/. Please replace the secrets whit 000 or something and send it here.

Levminer commented 3 months ago

Should be fixed by: 25e7c8626885e2d36efd7d6bf79d3f861f1cb208

HarleySalas commented 3 months ago

Should be fixed by: 25e7c86

Thank you! I saw this notification, but not the previous one. I apologize, I definitely would have gotten you what you need.