Problem/Motivation

An error message displayed when the mail_login module is used together with the TFA module.
TypeError:
Drupal\mail_login\AuthDecorator::__construct(): Argument #1
($user_auth) must be of type Drupal\user\UserAuthenticationInterface,
Drupal\tfa\TfaUserAuth given

Steps to reproduce

Use latest version of mail_login module (4.0.3)
Use latest version of TFA (2.0.0-alpha4)
Enable both modules using Drupal core 10.3.10.

Proposed resolution

The maintainer of TFA suggested to address the issue in mail_login, therefore I created a fix.
After applying the patch no error is triggered any more.

Remaining tasks

These checks won't be necessary any more when the old UserAuthInterface will be retired in Drupal 12, until that we need some changes to make them work together.
Old interface: https://git.drupalcode.org/project/drupal/-/blob/10.3.x/core/modules/use...
New interface: https://git.drupalcode.org/project/drupal/-/blob/10.3.x/core/modules/use...

Issue fork mail_login-3497643

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

imre.horjan created an issue. See original summary.

imre.horjan changed the visibility of the branch 3497643-backward-compatibility-fix to hidden.

imre.horjan’s picture

Assigned: imre.horjan » Unassigned
Status: Needs work » Needs review

I've created the MR

imre.horjan’s picture

The patch has also been hidden

imre.horjan’s picture

Issue summary: View changes
tomsaw’s picture

MR !20 worked for me.
drupal/mail_login with drupal/tfa works in my D10 again.

mqanneh’s picture

Assigned: Unassigned » mqanneh

  • mqanneh committed b1544cf3 on 4.0.x authored by imre.horjan
    Issue #3497643 by imre.horjan, tomsaw, mqanneh: Backward compatibility...
mqanneh’s picture

Assigned: mqanneh » Unassigned
Status: Needs review » Fixed
mqanneh’s picture

Status: Fixed » Closed (fixed)