logoUploader->store($data->logo); $appData = $this->connectedAppService->create( new ConnectAppRequest( name: $data->name, connectionProtocolId: ConnectionProtocol::query()->where('name', ConnectionProtocolEnum::OIDC->value)->first()->id, connectionProviderId: 0, slug: Str::slug($data->name), connectionStatusId: ConnectionStatus::query()->where('name', ConnectionStatusEnum::Connected->value)->first()->id, logo: $logo, ) ); $clientData = $this->clientCreationFactory->for($data->type)->create($data); DB::commit(); // remove sensitive data $appData->settings = null; return new CreatedApplicationData( application: $appData, clientCredentials: $clientData, ); } catch (Throwable $e) { DB::rollBack(); throw $e; } } }