Skip to content

Feature: Reusable MultiFactorChallenge class - #20353

Open
webard wants to merge 2 commits into
filamentphp:4.xfrom
webard:feat/reusable-multi-factor-challenge
Open

Feature: Reusable MultiFactorChallenge class#20353
webard wants to merge 2 commits into
filamentphp:4.xfrom
webard:feat/reusable-multi-factor-challenge

Conversation

@webard

@webard webard commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Description

The Pull Request extracts OTP functionality from Login into a separate MultiFactorChallenge class, making it possible to use this functionality outside the Login page.

The motivation for this change is work on a solution that allows actions to be confirmed with a one-time code. This is very useful for actions such as destructive operations.

Of course, this can be achieved without this change, but while working on it I thought that extracting this functionality into an external class would let authors reuse it in their own solutions.

The translation key stayed under login. The provider switcher still uses filament-panels::auth/pages/login.multi_factor.form.provider.label, even though the component no longer lives in Login. Moving the key would touch all localization files and would cause a regression in languages where the translation has not been added yet. I’m happy to move it if you prefer.

MultiFactorAuthenticationProvider::getLoginFormLabel() is now used outside login. The name no longer fully matches the usage, but renaming a method in a public interface would break providers outside core, so I’m leaving it unchanged.

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@danharrin danharrin added enhancement New feature or request pending review labels Aug 13, 2026
@danharrin danharrin added this to the v4 milestone Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request pending review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants