diff --git a/src/Authentication/Actions/Email2FA.php b/src/Authentication/Actions/Email2FA.php index 1d1e69c1c..28216d8cd 100644 --- a/src/Authentication/Actions/Email2FA.php +++ b/src/Authentication/Actions/Email2FA.php @@ -73,7 +73,7 @@ public function handle(IncomingRequest $request) } if (empty($email) || $email !== $user->email) { - return redirect()->route('auth-action-show')->with('error', lang('Auth.invalidEmail')); + return redirect()->route('auth-action-show')->with('error', lang('Auth.invalidEmail', [$email])); } $identity = $this->getIdentity($user); diff --git a/tests/Controllers/ActionsTest.php b/tests/Controllers/ActionsTest.php index ee8650122..8f30afb99 100644 --- a/tests/Controllers/ActionsTest.php +++ b/tests/Controllers/ActionsTest.php @@ -103,7 +103,7 @@ public function testEmail2FAHandleInvalidEmail(): void $result->assertRedirect(); $this->assertSame(site_url('/auth/a/show'), $result->getRedirectUrl()); - $result->assertSessionHas('error', lang('Auth.invalidEmail')); + $result->assertSessionHas('error', lang('Auth.invalidEmail', ['foo@example.com'])); } private function insertIdentityEmal2FA(): void