Invalid authentication code

Hi there. New Nitrokey Pro user here, trying to get going by enabling Two Factor Authentication for this very forum.

I work under Funtoo-Linux, got the Nitrokey App running (see: https://i.imgur.com/8Go0yzr.png) and follow the two-factor-generic tutorial.

I use the provided secret key, create a “slot” with it in the app, use Menu > Passwords > and the respective entry, use the OTP in the Code field and get the following error:

Invalid authentication code. Each code can only be used once.

This happens also with my Nextcloud account over at cloud01.opsdata.ch. What can I do further?

Hi!

Please make sure you are using the correct algorithm - TOTP for time-based codes, usually for web applications, and HOTP (counter based) for the other use cases.
If you are using TOTP, please make sure you have the correct time set, with difference lower than <10 seconds from the any internet time server (aka NTP servers). Since the code windows are usually 30 seconds wide, with 10 seconds of difference between clocks, one has only 20 seconds valid to get and enter the code. With difference bigger than 30 seconds its impossible to get correct code. As you see, the local clock synchronization is important.

Please look at this as well: [Solved] Nitrokey OTP's not Working.

It was the time! Thank you so much @szszszsz :smile:

1 Like