Closed tklie closed 5 months ago
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
48ef0b9
) to head (e502f57
). Report is 1 commits behind head on 2.x.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
This feature branch adds and exposes the
attemptWhen
method to/on theTwoFactorLoginHelper
andAuth2FA
. This allows projects that need to pass their own callbacks for pre-login checks to integrate with this package.This will not break backward compatibility since it merely adds a new method.
Code samples
This PR simply adds a new method matching the signature of the
SessionGuard
's method:And changes the current
attempt
method to call this new method passingnull
as$callbacks
:This approach seems cleaner than simply duplicating the code (which is actually what the
SessionGuard
does).