• Start

Languages

/

.NET

/

Methods

SignIn

The .NET SDK for SurrealDB enables simple and advanced querying of a remote or embedded database.

Signs in to a root, namespace, database or scope user.

Method Syntax
await db.SignIn(credentials)

Arguments

Description

credentials

Variables used in a signin query.

cancellationToken

The cancellationToken enables graceful cancellation of asynchronous operations.

// Sign in as root user
await db.SignIn(new RootAuth { Username = "root",
    Password = "secret" });

You can invalidate the authentication for the current connection using the Invalidate() method.

Was this page helpful?