### Problem / Motivation
I'm currently working on improving two-factor authentication for our Drupal 11 website using TFA 1.13 and a separate custom module.
While reviewing the integration, we couldn't find a documented hook or event that confirms when a user has successfully completed Google Authenticator verification and links that confirmation to their authenticated session.
I'm wondering if TFA already provides a supported way to capture this information. If not, would it be possible to introduce an event that:
- Triggers only after successful two-factor verification, including TOTP or a valid recovery code.
- Identifies the authenticated user and session without exposing any security codes or sensitive information.
- Allows other Drupal modules to recognize successful verification without modifying Drupal core or TFA.
- Works consistently across supported login methods.
The goal is to have a reliable way for other modules to confirm that two-factor authentication has actually been completed before allowing access to protected functionality.
I'd appreciate any guidance on whether this is already possible or something that could be considered for a future TFA release.
*Disclosure: I used AI assistance to help review the technical implementation and prepare this request.*
Comments