# LogtoBuilderExtensions

- Kind: `class`
- Package: [CommunityToolkit.Aspire.Hosting.Logto](/reference/api/csharp/communitytoolkit.aspire.hosting.logto.md)
- Version: `13.4.1-beta.706`
- Namespace: `Aspire.Hosting`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d479e13473b1d29d06b974f144a0049289a3cb5c/src/CommunityToolkit.Aspire.Hosting.Logto/LogtoBuilderExtensions.cs)

Provides extension methods for configuring and managing Logto resources within the Aspire hosting application framework.

## Definition

```csharp
namespace Aspire.Hosting;

public static class LogtoBuilderExtensions
{
    // ...
}
```

## Methods

- [AddLogto(IDistributedApplicationBuilder, string, IResourceBuilder<PostgresServerResource>, string, int?, int?)](/reference/api/csharp/communitytoolkit.aspire.hosting.logto/logtobuilderextensions/methods.md#addlogto-idistributedapplicationbuilder-string-iresourcebuilder-postgresserverresource-string-int-int) : `IResourceBuilder<LogtoResource>` `extension` `ats export` -- Adds a Logto resource to the Aspire distributed application by configuring it with the specified name, associated PostgreSQL server resource, and database name.
- [WithAdminEndpoint(IResourceBuilder<LogtoResource>, string)](/reference/api/csharp/communitytoolkit.aspire.hosting.logto/logtobuilderextensions/methods.md#withadminendpoint-iresourcebuilder-logtoresource-string) : `IResourceBuilder<LogtoResource>` `extension` `ats export` -- Configures the specified Logto resource to include an administrative endpoint with the given URL.
- [WithDatabase(IResourceBuilder<LogtoResource>, IResourceBuilder<PostgresServerResource>, string)](/reference/api/csharp/communitytoolkit.aspire.hosting.logto/logtobuilderextensions/methods.md#withdatabase-iresourcebuilder-logtoresource-iresourcebuilder-postgresserverresource-string) : `IResourceBuilder<LogtoResource>` `extension` `ats export` -- Configures the Logto resource to connect to the specified PostgreSQL database.
- [WithDatabaseSeeding(IResourceBuilder<LogtoResource>)](/reference/api/csharp/communitytoolkit.aspire.hosting.logto/logtobuilderextensions/methods.md#withdatabaseseeding-iresourcebuilder-logtoresource) : `IResourceBuilder<LogtoResource>` `extension` `ats export` -- Starts Logto by running the database seed command before the application process.
- [WithDataBindMount(IResourceBuilder<LogtoResource>, string)](/reference/api/csharp/communitytoolkit.aspire.hosting.logto/logtobuilderextensions/methods.md#withdatabindmount-iresourcebuilder-logtoresource-string) : `IResourceBuilder<LogtoResource>` `extension` `ats export` -- Configures the Logto resource to use a data bind mount with the specified source directory.
- [WithDataVolume(IResourceBuilder<LogtoResource>, string?)](/reference/api/csharp/communitytoolkit.aspire.hosting.logto/logtobuilderextensions/methods.md#withdatavolume-iresourcebuilder-logtoresource-string) : `IResourceBuilder<LogtoResource>` `extension` `ats export` -- Configures the Logto resource with a data volume, allowing persistent storage.
- [WithDeprecationTracing(IResourceBuilder<LogtoResource>)](/reference/api/csharp/communitytoolkit.aspire.hosting.logto/logtobuilderextensions/methods.md#withdeprecationtracing-iresourcebuilder-logtoresource) : `IResourceBuilder<LogtoResource>` `extension` `ats export` -- Enables Node.js deprecation tracing for the Logto by setting the NODE_OPTIONS environment variable to '--trace-deprecation'. This allows stack traces to be printed for deprecated API usage.
- [WithDisableAdminConsole(IResourceBuilder<LogtoResource>, bool)](/reference/api/csharp/communitytoolkit.aspire.hosting.logto/logtobuilderextensions/methods.md#withdisableadminconsole-iresourcebuilder-logtoresource-bool) : `IResourceBuilder<LogtoResource>` `extension` `ats export` -- Configures the Logto resource to disable the Admin Console port.
- [WithNodeEnv(IResourceBuilder<LogtoResource>, string)](/reference/api/csharp/communitytoolkit.aspire.hosting.logto/logtobuilderextensions/methods.md#withnodeenv-iresourcebuilder-logtoresource-string) : `IResourceBuilder<LogtoResource>` `extension` `ats export` -- Configures the Logto resource to use the specified Node.js environment value by setting the corresponding environment variable.
- [WithRedis(IResourceBuilder<LogtoResource>, IResourceBuilder<RedisResource>)](/reference/api/csharp/communitytoolkit.aspire.hosting.logto/logtobuilderextensions/methods.md#withredis-iresourcebuilder-logtoresource-iresourcebuilder-redisresource) : `IResourceBuilder<LogtoResource>` `extension` `ats export` -- Configures the Logto resource to use a specified Redis resource for caching or other functionality.
- [WithResourcePort(IResourceBuilder<LogtoResource>, int?, int?)](/reference/api/csharp/communitytoolkit.aspire.hosting.logto/logtobuilderextensions/methods.md#withresourceport-iresourcebuilder-logtoresource-int-int) : `IResourceBuilder<LogtoResource>` `extension` `ats export` -- Configures HTTP endpoints for the given Logto resource builder with specified port settings.
- [WithSecretVault(IResourceBuilder<LogtoResource>, string)](/reference/api/csharp/communitytoolkit.aspire.hosting.logto/logtobuilderextensions/methods.md#withsecretvault-iresourcebuilder-logtoresource-string) : `IResourceBuilder<LogtoResource>` `extension` `ats export` -- Configures the Logto resource to use a secret vault with the specified key encryption key (KEK).
- [WithSensitiveUsername(IResourceBuilder<LogtoResource>, bool)](/reference/api/csharp/communitytoolkit.aspire.hosting.logto/logtobuilderextensions/methods.md#withsensitiveusername-iresourcebuilder-logtoresource-bool) : `IResourceBuilder<LogtoResource>` `extension` `ats export` -- Specifies whether the username is case-sensitive.
- [WithTrustProxyHeader(IResourceBuilder<LogtoResource>, bool)](/reference/api/csharp/communitytoolkit.aspire.hosting.logto/logtobuilderextensions/methods.md#withtrustproxyheader-iresourcebuilder-logtoresource-bool) : `IResourceBuilder<LogtoResource>` `extension` `ats export` -- Configures the Logto resource to enable or disable the trust proxy header behavior.
