Different TOTP code: App vs onlykey-cli

Hi,

did anybody also experience the following weird case:

When I set up a slot with a TOTP secret through the onlykey app (Multi-factor, OATH-TOTP), it generates me a different TOTP code compared to when I set up another slot with exactly the same TOTP secret but through onlykey-cli (e.g. setslot 4a 2fa g, setslot 4a totpkey).

This is very strange… it turns out the right TOTP key gets generated only when I set the slot through the onlykey app.

Does anybody have an idea how to solve my problem?

Thanks in advance!

I think you would need to run onlykey-cli settime before you getting the TOTP from the cli

I am not trying to get a six digit TOTP code from the cli, I just want to set a TOTP secret from the cli, so I am able to get the six digit TOTP codes (derived by the aforementioned TOTP secret) through the usual way (pressing a physical button on my onlykey).

I also tried to use ‘onlykey-cli settime’ before entering the TOTP secret, but I didn’t made a difference. If this is what you meant.