BUG: GitHub verification gets stuck in “Verification Pending” state

Aperta
#223 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@AkshitGarg054 ci sta già lavorando.

Dal 10/1/2026.

  • #224 di @AkshitGarg054 — aperta

Valutazione

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

Direzione di ricerca

Inizia dal punto di ingresso /verify_github e traccia come chiama create_verification_session(...), cleanup_expired_tokens() e _cleanup_expired_sessions(). Conferma i percorsi di scadenza in memoria e nel database, quindi verifica che una sessione scaduta venga eliminata prima della creazione di un nuovo link di verifica e che rieseguire /verify_github non risulti bloccato.

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

Descrizione

Is there an existing issue for this?
  • I have searched the existing issues
What happened?

📌 Issue Overview

While setting up the project locally and testing the Discord → GitHub verification flow, I noticed that the verification process can get stuck in a “Verification Pending” state indefinitely, even after the verification session has expired.

This prevents users from re-initiating GitHub verification via /verify_github.

🎯 Expected Behavior

Verification sessions should expire after 5 minutes
Once expired:

  • The user should be able to re-run /verify_github
  • A new verification session should be created

🚨 Actual Behavior

After the initial verification session expires:

  • The user still receives “Verification Pending”
  • /verify_github does not generate a new verification link
  • The flow remains blocked until manual cleanup or restart

Root Cause :

The issue appears to be related to expired verification state not being cleared at the right time.

Key observations:
Verification sessions are stored in:

  • In-memory _verification_sessions
    Database fields:
  • verification_token, verification_token_expires_at

Cleanup logic exists, but :
It is not guaranteed to run before /verify_github checks for an existing pending verification. As a result, an expired token can still block new verification attempts.

Suggested Fix :

Without changing the existing verification logic, this can be resolved by ensuring expired verification state is cleared before checking for a pending verification.

  • Ensure cleanup runs before creating a new session :
    In create_verification_session(...), explicitly run cleanup before creating a new session:
    await cleanup_expired_tokens()
    _cleanup_expired_sessions()
Record
  • I agree to follow this project's Code of Conduct
  • I want to work on this issue
Lingua principale
Python
Stelle
103
Fork
143
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

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 AOSSIE-Org/Devr.AI

Tutte le issue di AOSSIE-Org/Devr.AI

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.