You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d6c7ac2
Browse filesBrowse the repository at this point in the historyBrowse files
fix(2fa): apply the local MFA policy to social login
Social login (SocialLoginController::callback) established a full session
for any user that passed canLogin(), so an account with
shouldRequire2FA() true could log in and obtain tokens without ever
passing the 2FA challenge the password flow enforces.
Extract the password flow's challenge issuance (gate check, resend
rate-limit, OTP issuance scoped to the pending OAuth2 client, audit log,
session bookkeeping) from UserController::postLogin into a dedicated
TwoFactorChallengeService, and call it from the social callback before
Auth::login(). An enforced user now gets the same email-OTP challenge and
completes it through the unchanged verify2FA endpoint; non-enforced users
and the two_factor.enabled kill-switch behave as before.
Drop the now-unused ITwoFactorGateService / ITwoFactorRateLimitService
dependencies from UserController.
0 commit comments