'pgAdmin docker 2FA TOTP authentication error "Failed to validate the code"
I'm using the dpage/pgadmin4:6.3 image available at https://hub.docker.com/r/dpage/pgadmin4/
I'm trying to setup the 2FA TOTP based authentication by clicking on the top-right corner of the app (user icon) then on "Two-Factor Authentication" to open a new popup with the QR code displayed in my web browser (Firefox 95.0.2 at the time of writing).
I scan the code (either with the DUO or the FREOTP+ applications (both are giving me the same code at the same time)) then I enter it in the app and click "Continue" but this message shows:
Failed to validate the code
Service log (docker) prints this line when clicking on the "Continue" button:
pgadmin4 | ::ffff:172.18.0.1 - - [12/Jan/2022:08:38:07 +0000] "POST /mfa/register HTTP/1.1" 200 19240 "http://localhost:5050/mfa/register" "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0"
How could I get it to work?
Please note that both scanning applications on the mobile device are perfectly working for other websites needing 2FA authentication such as github or others.
Edit:
The same error occurs with:dpage/pgadmin4:6.4dpage/pgadmin4:6.5
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

