• Start

Languages

/

Swift

/

Methods

signup

The signup() method for the SurrealDB Swift SDK signs a new record-access user up.

Signs a new record-access user up and returns the issued tokens.

Method Syntax

let tokens = try await client.signup(credentials)
ArgumentsDescription
credentials The record-access credentials to sign up with, created via .accessRecord.
let tokens = try await client.signup(.accessRecord(
namespace: "myapp",
database: "mydb",
access: "account",
variables: ["email": .string("new@example.com"),
"pass": .string("secret")]
))

See Authentication for more detail.

Was this page helpful?