Version 2.2.0 of laravel-two-factor-authentication
Features
- It is now possible to perform an additional action after the user has completed the two-factor authentication sequence successfully. This works identical to how Laravel handles this after login. In order to do this override the
authenticated
method of theTwoFactorAuthenticatesUsers
trait in yourTwoFactorAuthController
:
class TwoFactorAuthController extends Controller
{
...
/**
* The user has been two-factor authenticated.
*
* @param \Illuminate\Http\Request $request
* @param mixed
* @return mixed
*/
protected function authenticated(Request $request, $user)
{
// Optionally do something after two-factor authentication is completed...
}
}
- A
TwoFactorAuthenticated
event now is fired after two-factor authentication completes. This is passed in the logged in user for convenience. - An example project has been added. This serves both as a reference for how to set up this package in your own project and as a test suite.
- The published blade views have been updated to improve compatibility with the latest Bootstrap 4 version.