keepass2android icon indicating copy to clipboard operation
keepass2android copied to clipboard

Can't login because OTP property missing

Open santo998 opened this issue 3 years ago • 10 comments

I only use KeePass 2.53.1 x64 in my desktop to generate TOTPs for my entries. Then, I use KeePass2Android on my phone to copy TOTPs to login on websites that I access on my phone. Problem is some TOTPs work, but others don't.

All my TOTPs were generated the same way, by KeePass 2.x TOTP generator menu. All have the same named default property: "TimeOtp-Secret-Base32" and I didn't modify it.

Concrete examples: Uber: TimeOtp-Secret-Base32 length = 32 characters, it HAS TOTP property defined Dropbox: TimeOtp-Secret-Base32 length = 26 characters, it HASN'T TOTP property defined Twitch: TimeOtp-Secret-Base32 length = 52 characters, it HASN'T TOTP property defined

I dont know if it's related to TOTP seed length, but only my Uber account has the TOTP property. On the others entries if I enter to edit them, I don't see TOTP properties, but on my Uber entry I do. Also when auto-type I see defined TOTP property to copy on my Uber entry, but on the others don't.

santo998 avatar Feb 20 '23 00:02 santo998

I also have this problem. I've gone through my database and all TimeOtp-Secret-Base32 entries that don't have a corresponding TOTP generated in K2A are either 26 or 52 characters long.

In comparison, secrets which have 16, 24, or 32 characters do generate a TOTP.

zsigmi avatar Feb 23 '23 08:02 zsigmi

@zsigmi the work you have done is amazing! Searching all your TOTP seeds as real world examples to confirm what is happening here. You confirmed something is happening with 26 and 52 characters length TOTP seeds. This is a pretty much important bug, because it makes TOTP 2FA unusable on some websites.

santo998 avatar Feb 23 '23 17:02 santo998

@PhilippC I think this issue is pretty important and needs to be fixed. If not, then KeePass2Android won't support TOTP 2FA. Also should be an easy fix

santo998 avatar Mar 05 '23 08:03 santo998

The TOTP code is also not always considered. I have about 10 entries with TOTP and in one the code in the application is not considered, although in Keepass 2.53.1 for Windows everything is considered correctly.

alexwlpr avatar Mar 22 '23 14:03 alexwlpr

Still facing the same issue. For keys with length <32 signs TOTP are showing correctly, but for longer keys it doesn't show TOTP value. Tried on Dropbox and epic account. On KeePass (windows) it's all ok, on keepassdx (Android too).

inzaghi89 avatar Sep 15 '23 12:09 inzaghi89

@inzaghi89 not only that. Try with 26 characters TOTP seed. Just test with random characters...

santo998 avatar Sep 15 '23 15:09 santo998

Interesting is that key from Google (32 chars) works without any problem. I'm really not sure why some keys isn't displayed correctly.

inzaghi89 avatar Sep 15 '23 17:09 inzaghi89

can somebody please provide a demo kdbx file (including master key) here for testing?

PhilippC avatar Jan 03 '24 08:01 PhilippC

forget my previous comment. https://github.com/PhilippC/keepass2android/issues/2020 includes one.

PhilippC avatar Jan 03 '24 08:01 PhilippC

The bug persists in the latest version as well ..

d0verenny avatar Apr 12 '26 14:04 d0verenny