Benenne den Authenticator und merke denselben Browser für 30 Tage.
Deploy Test / test (push) Successful in 13s
Deploy Test / deploy (push) Successful in 23s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-15 10:15:33 +01:00
1 parent cd79fb99d7
commit b374335b3a
10 files changed
+241 -4

No files matched your search

+3
View File
@@ -6,8 +6,10 @@
use App\Domain\Cms\NavigationItemPolicy;
use App\Domain\Cms\Page;
use App\Domain\Cms\PagePolicy;
use App\Http\Responses\StaffLoginResponse;
use App\Models\User;
use App\Policies\UserPolicy;
use Filament\Auth\Http\Responses\Contracts\LoginResponse as LoginResponseContract;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
@@ -21,6 +23,7 @@ public function register(): void
public function boot(): void
{
$this->app->bind(LoginResponseContract::class, StaffLoginResponse::class);
Gate::policy(Page::class, PagePolicy::class);
Gate::policy(NavigationItem::class, NavigationItemPolicy::class);
Gate::policy(User::class, UserPolicy::class);
@@ -2,6 +2,8 @@
namespace App\Providers\Filament;
use App\Auth\StaffAuthenticatorName;
use App\Filament\Auth\StaffLogin;
use App\Http\Middleware\SanitizeIntendedUrl;
use Filament\Auth\MultiFactor\App\AppAuthentication;
use Filament\Http\Middleware\Authenticate;
@@ -28,14 +30,16 @@ public function panel(Panel $panel): Panel
->default()
->id('verwaltung')
->path('verwaltung')
->login()
->login(StaffLogin::class)
->brandName('Verwaltung')
->authGuard('staff')
->colors([
'primary' => Color::hex('#0F6E56'),
])
->multiFactorAuthentication([
AppAuthentication::make()->recoverable(),
AppAuthentication::make()
->recoverable()
->brandName(StaffAuthenticatorName::current()),
], isRequired: true)
->discoverResources(in: app_path('Filament/Resources'), for: 'App\Filament\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\Filament\Pages')