MFA TOTP Authenticator - "Failed to validate the code"

Aperta
#9,783 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python

Direzione di ricerca

Start by reproducing the MFA registration flow using the reported config_local.py settings on the listed Ubuntu and pgAdmin setup. Trace the TOTP validation path reached after scanning the QR code and entering the authenticator code. Done means valid TOTP codes are accepted during registration and the regression is covered by an appropriate test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Support

When registering for MFA using TOTP code, it gives error "Failed to validate the code".

To Reproduce

Steps to reproduce the behavior:

  1. sudo apt install pgadmin4-web
  2. Create config_local.py to force MFA via TOTP.
########################################################################
# Two-factor Authentication Configuration
########################################################################

# Set it to True, to enable the two-factor authentication
MFA_ENABLED = True

# Set it to True, to ask the users to register forcefully for the
# two-authentication methods on logged-in.
MFA_FORCE_REGISTRATION = True

# pgAdmin supports Two-factor authentication by either sending an one-time code
# to an email, or using the TOTP based application like Google Authenticator.
MFA_SUPPORTED_METHODS = ["authenticator"]
########################################################################
  1. Login via pgadmin4 web & scan TOTP QR code in Google authenticator.
  2. Enter TOTP code from authenticator.
  3. Get error message "Failed to validate the code".
  • OS: Ubuntu 22.04.5 LTS, Linux-6.8.0-106-generic-x86_64-with-glibc2.35
  • pgAdmin version: 9.13
  • Mode: Server
  • Browser (if running in server mode): Chrome 146.0.0.0
  • Package type: DEB
  • Python version: 3.10.12

I am accessing /pgadmin4 web via an insecure IP address.

Lingua principale
Python
Stelle
3.9k
Fork
918
Merge medio
2g 12h
PR unite (30g)
35

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pgadmin-org/pgadmin4

Tutte le issue di pgadmin-org/pgadmin4

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.