Keepassxc: Can't get Gitlab 2FA to work

Created on 13 Jan 2020  路  2Comments  路  Source: keepassxreboot/keepassxc

Expected behavior

Adding a 2FA (TOPT) key from GitLab should allow me to generate the right TOPT code.

Current Behavior

The TOPT code generated does not work when trying to authenticate.
I imported the same key to the Aegis Android app and the TOTP code it gives me works.

GitLab generates a key with:

  • Algorithm: SHA-1
  • Time step: 30 sec
  • Code size: 6 digits

I tried the Default RFC 6238 token settings and the Use custom settings with the above values but it still does not work.

Possible Solution

No idea.

Steps to Reproduce

  1. Generate a 2FA key in the Gitlab account page
  2. Copy the key to the Set up TOTP... dialog of Keepassxc
  3. Copy the TOTP generated by Keepassxc to GitLab's 2FA prompt
  4. The code entered is invalid according to GitLab

Context

I cannot generate TOTP for GitLab from Keepassxc, so I use an Android app instead (but I only encounter this problem with GitLab in Keepassxc).

Debug Info

KeePassXC - Version 2.5.2
Revision: 2cda9d

Libraries:

  • Qt 5.14.0
  • libgcrypt 1.8.5

Operating system: Arch Linux
CPU architecture: x86_64
Kernel: linux 5.4.10-arch1-1

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • KeeShare (signed and unsigned sharing)
  • YubiKey
  • Secret Service Integration
bug

Most helpful comment

Check that your system time is synced

All 2 comments

Check that your system time is synced

$ timedatectl 
               Local time: Mon 2020-01-13 12:50:38 CET
           Universal time: Mon 2020-01-13 11:50:38 UTC
                 RTC time: Mon 2020-01-13 11:50:38
                Time zone: Europe/Paris (CET, +0100)
System clock synchronized: no
              NTP service: inactive
          RTC in local TZ: no

It looks like I'm not synced properly System clock synchronized: no.
After running ntpd -qg it synced back properly.

Thanks for quickly identifying my problem!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nfnty picture nfnty  路  3Comments

TheZ3ro picture TheZ3ro  路  3Comments

Throne3d picture Throne3d  路  3Comments

shyim picture shyim  路  3Comments

JosephHatfield picture JosephHatfield  路  3Comments