registerComponent('toaster'); } /** * Bootstrap any application services. * * @return void */ public function boot() { // Jetstream::ignoreRoutes(); // Completely disable Jetstream routes, stops Jetstream-specific routes (teams, profile, API tokens, etc.). $this->configurePermissions(); Jetstream::deleteUsersUsing(DeleteUser::class); //TODO: fix this registration. Why is it registered here and like this? Livewire::component('profile-user.update-profile-personal-form', UpdateProfilePersonalForm::class); Livewire::component('profile-user.update-profile-phone-form', UpdateProfilePhoneForm::class); // Register customized Jetstream DeleteUserForm Livewire::component('profile.delete-user-form', DeleteUserForm::class); // CRITICAL SECURITY: Register custom TwoFactorAuthenticationForm with authorization checks // This overrides the vendor Jetstream component to prevent IDOR attacks Livewire::component('profile.two-factor-authentication-form', TwoFactorAuthenticationForm::class); // CRITICAL SECURITY: Register custom UpdatePasswordForm with authorization checks // This overrides the vendor Jetstream component to prevent unauthorized password changes Livewire::component('profile.update-password-form', UpdatePasswordForm::class); // Register LoginResponse for conditional redirects in Http/Responses/LoginResponse.php // This is used to load language preference after login $this->app->singleton( \Laravel\Fortify\Contracts\LoginResponse::class, \App\Http\Responses\LoginResponse::class ); // Register TwofactorLoginResponse for conditional redirects in Http/Responses/LoginResponse.php // This is used to load language preference after login $this->app->singleton( \Laravel\Fortify\Contracts\TwoFactorLoginResponse::class, \App\Http\Responses\LoginResponse::class ); } /** * Configure the permissions that are available within the application. * * @return void */ protected function configurePermissions() { Jetstream::defaultApiTokenPermissions(['read']); Jetstream::permissions([ 'create', 'read', 'update', 'delete', ]); } protected function registerComponent(string $component) { Blade::component('components.' . $component, $component); } }