CommunityToolkit.Aspire.Hosting.Logto 13.4.1-beta.685

Prefix Reserved
This is a prerelease version of CommunityToolkit.Aspire.Hosting.Logto.
dotnet add package CommunityToolkit.Aspire.Hosting.Logto --version 13.4.1-beta.685
                    
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Logto -Version 13.4.1-beta.685
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Logto" Version="13.4.1-beta.685" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.Logto" Version="13.4.1-beta.685" />
                    
Directory.Packages.props
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Logto" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CommunityToolkit.Aspire.Hosting.Logto --version 13.4.1-beta.685
                    
#r "nuget: CommunityToolkit.Aspire.Hosting.Logto, 13.4.1-beta.685"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CommunityToolkit.Aspire.Hosting.Logto@13.4.1-beta.685
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CommunityToolkit.Aspire.Hosting.Logto&version=13.4.1-beta.685&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.Logto&version=13.4.1-beta.685&prerelease
                    
Install as a Cake Tool

Logto Hosting Extensions for .NET Aspire

Overview

This package provides .NET Aspire hosting extensions for integrating Logto with your AppHost. It includes helpers for wiring Logto to PostgreSQL (via Aspire.Hosting.Postgres.AddPostgres()) and optional Redis caching, and exposes fluent APIs to configure the required environment variables for Logto database connectivity, initialization, and caching.


Features

  • Configure Logto to use PostgreSQL via AddLogto(...).
  • Optional Redis integration for caching via .WithRedis(...).
  • Fluent helpers to set environment variables:
    • DB_URL (Postgres connection string)
    • REDIS_URL
    • NODE_ENV
    • ADMIN_ENDPOINT
  • Data persistence via:
    • .WithDataVolume() (managed Docker volume)
    • .WithDataBindMount() (host bind mount).
  • Configurable Admin Console access and proxy header trust (TRUST_PROXY_HEADER).
  • Built-in health check for /api/status.

Usage (AppHost)

using Aspire.Hosting;
using Aspire.Hosting.Postgres;
var postgres = builder.AddPostgres("postgres");

// Basic setup connecting to Postgres
var logto = builder
    .AddLogto("logto", postgres)
    .WithDatabaseSeeding();

// Advanced setup with Redis and specific configurations
var redis = builder.AddRedis("redis");

var logtoSecure = builder
    .AddLogto("logto-secure", postgres, databaseName: "logto_secure_db")
    .WithRedis(redis)
    .WithAdminEndpoint("https://admin.example.com")
    .WithDisableAdminConsole(false)
    .WithTrustProxyHeader(true)      // optional override, default is already true
    .WithSensitiveUsername(true)
    .WithNodeEnv("production");

Logto will be configured with:

  • DB_URL=postgresql://.../logto_db (constructed from the Postgres resource)
  • REDIS_URL=... (when Redis is attached with .WithRedis(...))
  • ADMIN_ENDPOINT=... (when configured with .WithAdminEndpoint(...))
  • NODE_ENV=production (when configured with .WithNodeEnv(...))
  • Auto-configured health checks on /api/status.

Notes

  • Extension methods are in the Aspire.Hosting namespace.
  • Call .WithDatabaseSeeding() to run the database seeding command npm run cli db seed -- --swe && npm start on startup.
  • Container ports are 3001 (HTTP) and 3002 (Admin). Host ports are random by default unless explicitly configured.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
13.4.1-beta.685 35 7/9/2026
13.4.1-beta.683 43 7/9/2026
13.4.1-beta.680 42 7/7/2026
13.4.1-beta.676 48 7/7/2026
13.4.1-beta.675 44 7/6/2026
13.4.1-beta.674 50 7/6/2026
13.4.0-beta.671 47 7/3/2026