SurrealDB Docs Logo

Enter a search query

.SignIn()

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

Method Syntax
await db.SignIn(credentials)

Arguments

ArgumentsDescription
credentials required

Variables used in a signin query.

cancellationToken optional

The cancellationToken enables graceful cancellation of asynchronous operations.

Example usage

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

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

On this page

© SurrealDB GitHub Discord Community Cloud Features Releases Install