Some TOTP entries are not working
For some of my database entries there is no TOTP value generated. But KeepassXC can generate it and when I use keepmenu to "View/Type individual entries" and go to the entry, I can see two fields "TOTP Seed" and "TOTP Settings", but the "TOTP" field is empty.
Can you please post both working and non-working values (feel free to randomize numbers/urls, etc, I'm more looking at the format) for the TOTP Seed field?
I think where it works is when the attribute otp is present, using the format otpauth://totp/blah?secret=SUPERSECRET&period=30&digits=6 and where it doesn't work it has two fields, one called TOTP Seed with the secret and one called TOTP Settings with the value 30;6.
Both methods are actually well described here: https://keepassium.com/articles/how-to-setup-totp/
That would make sense. Keepmenu only processes the first url-style format. Can you create a test .kdbx database with one working entry and a couple of the non-working entries so I can look at the actual field names/values that will need to be processed? Thanks!
Here's the file. Password is password
All "Test TOTP" entries should generate the same token and all "Other TOTP" entries as well.
TOTP-Test.zip
Give the totp branch a try and see if that works for you. Thanks for the detailed info and the sample kdbx file! Made solving this significantly easier!
@firecat53 some additional formats to detect:
-
the original keepass2 has its own totp feature comprised of distinct entry fields and autotype triggers. keepass2 can in fact import
otpauth://strings into this fieldset. -
keepass2's keeotp / keeotp2 plugins can use a slightly different format for the
otpfield. this is partially supported by keepassxc (and I myself have a lot of entries with this format 😅)OTP type otpfield value with all possible parametersTime-based key=whatever&type=Totp&step=30&size=6&otpHashMode=Sha1&encoding=Base32HMAC-based key=whatever&type=Hotp&counter=0&size=6&otpHashMode=Sha1&encoding=Base32parameter value Notes key string the only required parameter type Hotp/Totpdefault: Totpstep int default: 30, available iftype=Totpsize int default: 6counter int default: 0, incremented on keygen. available iftype=HotpotpHashMode Sha1/Sha256/Sha512default: Sha1encoding Base32/Base64/Hex/UTF8default: Base32
@firecat53 some additional formats to detect:
here's a demo db with samples of both.
Database.zip Password: x
@firecat53 also, I should note, the "TOTP Seed", "TOTP Settings" fields were introduced by keepass2's KeeTrayTOTP & TrayTOTP plugins. Keepassium just implemented support for this convention in their application.
@firecat53 some additional formats to detect:
the original keepass2 has its own totp feature comprised of distinct entry fields and autotype triggers. keepass2 can in fact import
otpauth://strings into this fieldset.keepass2's keeotp / keeotp2 plugins can use a slightly different format for the
otpfield. this is partially supported by keepassxc (and I myself have a lot of entries with this format sweat_smile)
@firecat53 i can work on adding support for these, should i work on top of the totp branch?
That would be great! I've got family coming in this weekend so time will be limited for awhile. Let me know if you have implementation questions and please add tests as well. Thanks!
@seidler2547 Please test if the new OTP support works for you. Thanks!
@firecat53 sorry for the delay, my use cases work fine now. Thanks!