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

@@ -0,0 +1,21 @@
<?php
namespace App\Filament\Auth;
use App\Auth\TrustedStaffDevice;
use App\Models\User;
use Filament\Auth\MultiFactor\Contracts\MultiFactorAuthenticationProvider;
use Filament\Auth\MultiFactor\MultiFactorChallenge;
use Illuminate\Contracts\Auth\Authenticatable;
class TrustedDeviceChallenge extends MultiFactorChallenge
{
public function getFirstEnabledProvider(Authenticatable $user): ?MultiFactorAuthenticationProvider
{
if ($user instanceof User && app(TrustedStaffDevice::class)->isTrusted($user)) {
return null;
}
return parent::getFirstEnabledProvider($user);
}
}