Two Factor Authentication via TOTP for all your Users out-of-the-box.
This packages adds a Contract to detect in a per-user basis if it should use Two Factor Authentication. It includes a custom view and a listener to handle the Two Factor authentication itself during login attempts.
It is not invasive, but you can go full manual if you want.
To use it, add the
TwoFactorAuthenticatable contract and the
TwoFactorAuthentication trait to the User model, or any other model you want to make Two Factor Authentication available.
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable implements TwoFactorAuthenticatable
Installation per Composer:
composer require darkghosthunter/laraguard
💵 This linked article is stuck behind Medium’s metered paywall, which may prevent you from reading it. Open the link in an incognito window to bypass Medium’s ridiculous reading limit.