SurrealDB Docs Logo

Enter a search query

.SignUp()

Signs up to a specific authentication scope / access method.

Method Syntax
await db.SignUp(credentials)

Arguments

ArgumentsDescription
credentials required

Credentials to sign up as a scoped user.

Example usage

// Sign in to authentication `db` using the root user authData := &surrealdb.Auth{ Username: "root", // use your setup username Password: "root", // use your setup password Namespace = "test", Database = "test", Access = "user", Email = "info@surrealdb.com", Password = "123456" } token, err := db.SignUp(authData) if err != nil { panic(err) }

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

On this page

© SurrealDB GitHub Discord Community Cloud Features Releases Install