AuthClient

Namespace: Daisi.SDK.Clients.V1.Orc

Inheritance: AuthProto.AuthProtoClient

Factory

AuthClientFactory - use to create an AuthClient instance.

// If not using the DaisiStaticSettings.DefaultClientKeyProvider, pass it in
var factory = new AuthClientFactory(clientKeyProvider);

// Otherwise you can do this
// var factory = new AuthClientFactory();

var client = factory.Create();

Remarks

The client automatically injects the configured client key into gRPC headers.

AuthClient Usage

Example for AuthClient creation:

var authFactory = new Daisi.SDK.Clients.V1.Orc.AuthClientFactory(clientKeyProvider);
var authClient = authFactory.Create();
// Use authClient for authentication

Using AuthClient with Dependency Injection

Example in a Blazor component:

@inject Daisi.SDK.Clients.V1.Orc.AuthClientFactory AuthFactory

@code {
    private AuthClient authClient;

    protected override void OnInitialized()
    {
        authClient = AuthFactory.Create();
        // Use authClient for authentication
    }
}
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.