Backward compatibility fix for UserAuthenticationInterface

Created on 6 January 2025, 3 days ago

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 did so.
After applying the patch the error is not triggered by mail_login any more.

I will create a branch and a merge request soon.

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...
https://git.drupalcode.org/project/drupal/-/blob/10.3.x/core/modules/use...

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs work

Version

4.0

Component

Code

Created by

🇭🇺Hungary imre.horjan Hungary

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024