.SignUp()
Signs up to a specific authentication scope / access method.
Method Syntax
await db.SignUp(credentials)
Arguments
| Arguments | Description |
|---|
credentials required | Credentials to sign up as a scoped user. |
Example usage
authData := &surrealdb.Auth{
Username: "root",
Password: "secret",
Namespace = "test",
Database = "test",
Access = "user",
Email = "info@surrealdb.com",
Password = "123456"
}
token, err := db.SignUp(authData)
if err != nil {
panic(err)
}
authData := &surrealdb.Auth{
Username: "root",
Password: "secret",
Namespace = "test",
Database = "test",
Scope = "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.