Nitrokey 3 Linux User Authentication Stopped Working

Hello. I’ve been using the Nitrokey 3A Mini for pam_u2f for a while. I recently updated the firmware from 1.8 to 1.9. I then reset the Nitrokey to factory settings and generated a new u2f_keys file. However, after placing the u2f_keys file in the correct location, pam_u2f stopped accepting the Nitrokey. I can tell that it checks the Nitrokey because sudo stalls for a second and the Nitrokey turns green before turning off again. I tried using my old u2f_keys, but that didn’t work either. Any suggestions?

Can you share how you generated the new file and with which configuration you use it? It is expected that the old file no longer works because you reset the key.

Thanks for reaching out so quickly!
I use NixOS, so I used the pamu2fcfg and pam_u2f.so from nixpkgs. In other words, I got them from developers.yubico.com.
I ran pamu2fcfg, tapped the Nitrokey, copied the output to a file and used the file in /etc/pam.d/sudo (and other PAM files). Here is my /etc/pam.d/sudo:

# Account management.
account required /nix/store/ajn83h1fdvxjv69fg1fpi6wcmhbkmzh3-linux-pam-1.7.2/lib/security/pam_unix.so # unix (order 11000)

# Authentication management.
auth sufficient /nix/store/8gg72kbcjfhz3yajrv9hb2s8152h44y2-pam_u2f-1.4.0/lib/security/pam_u2f.so authfile=/run/secrets/u2f_keys cue cue_prompt=Tap. origin=pam://<hostname omitted> # u2f (order 10900)
auth sufficient /nix/store/ajn83h1fdvxjv69fg1fpi6wcmhbkmzh3-linux-pam-1.7.2/lib/security/pam_unix.so likeauth try_first_pass # unix (order 11700)
auth required /nix/store/ajn83h1fdvxjv69fg1fpi6wcmhbkmzh3-linux-pam-1.7.2/lib/security/pam_deny.so # deny (order 12500)

# Password management.
password sufficient /nix/store/ajn83h1fdvxjv69fg1fpi6wcmhbkmzh3-linux-pam-1.7.2/lib/security/pam_unix.so nullok # unix (order 10200)

# Session management.
session required /nix/store/ajn83h1fdvxjv69fg1fpi6wcmhbkmzh3-linux-pam-1.7.2/lib/security/pam_env.so conffile=/etc/pam/environment readenv=0 # env (order 10100)
session required /nix/store/ajn83h1fdvxjv69fg1fpi6wcmhbkmzh3-linux-pam-1.7.2/lib/security/pam_unix.so # unix (order 10200)
session required /nix/store/ajn83h1fdvxjv69fg1fpi6wcmhbkmzh3-linux-pam-1.7.2/lib/security/pam_limits.so conf=/nix/store/5mn0dn14n6dwb22gpw3sjmnbpqk7pm6w-limits.conf # limits (order 12200)