diff --git a/src/Listeners/LoginViaRemember.php b/src/Listeners/LoginViaRemember.php index 3a11b0e..5a7330e 100644 --- a/src/Listeners/LoginViaRemember.php +++ b/src/Listeners/LoginViaRemember.php @@ -4,6 +4,7 @@ use Illuminate\Auth\Events\Login; use Illuminate\Contracts\Auth\Authenticatable as User; +use Illuminate\Events\Dispatcher; use Illuminate\Support\Facades\Auth; use LaravelWebauthn\Facades\Webauthn; @@ -28,4 +29,16 @@ private function registerWebauthn(User $user) Webauthn::login($user); } } + + /** + * Register the listeners for the subscriber. + * + * @return array + */ + public function subscribe(Dispatcher $events): array + { + return [ + Login::class => 'handle', + ]; + } }