Skip to content

Conversation

@Junveloper
Copy link
Contributor

@Junveloper Junveloper commented Jun 11, 2025

This PR allows RedirectIfTwoFactorAuthenticatable to be resolved via the container, making it easier to bind a custom redirect action class.

Currently, the RedirectIfTwoFactorAuthenticatable action stores login information (i.e. login.id) in the session, which prevents Fortify’s existing 2FA flow from being used in mobile apps. As a result, mobile support requires custom logic.

Although it’s possible to override the redirect action using Fortify::authenticateThrough(...), other key authentication actions in the login flow are already container-resolvable and easily swappable. This PR also brings consistency by making RedirectIfTwoFactorAuthenticatable resolvable in the same way.

@taylorotwell taylorotwell merged commit 0fb2ec9 into laravel:1.x Jun 11, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants