Skip to content

Version 2.2.0 of laravel-two-factor-authentication

Compare
Choose a tag to compare
@michaeldzjap michaeldzjap released this 13 Sep 16:00
· 96 commits to master since this release

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 the TwoFactorAuthenticatesUsers trait in your TwoFactorAuthController:
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.