PHP code example of bbs-lab / filament-force-two-factor
1. Go to this page and download the library: Download bbs-lab/filament-force-two-factor library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bbs-lab / filament-force-two-factor example snippets
use BBSLab\FilamentForceTwoFactor\FilamentForceTwoFactorPlugin;
use Filament\Auth\MultiFactor\App\AppAuthentication;
public function panel(Panel $panel): Panel
{
return $panel
->multiFactorAuthentication([
AppAuthentication::make(),
], isRequired: true)
->plugin(FilamentForceTwoFactorPlugin::make());
}
use BBSLab\LaravelForceTwoFactor\Facades\ForceTwoFactor;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Http\Request;
ForceTwoFactor::bypass(fn (Request $r, Authenticatable $u): bool => /* ... */);