We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e429ca0 commit 63e1c78Copy full SHA for 63e1c78
1 file changed
src/client.ts
@@ -37,19 +37,21 @@ export class SurrealDBClient {
37
}
38
39
if (isUrlConfig(config)) {
40
- await this.db.connect(config.url, {
+ await this.db.connect(config.url);
41
+ await this.db.signin({
42
+ username: config.username,
43
+ password: config.password,
44
+ });
45
+ await this.db.use({
46
namespace: this.namespace,
47
database: this.database,
- authentication: {
- username: config.username,
- password: config.password,
- },
48
});
49
} else if (isTokenConfig(config)) {
50
51
+ await this.db.authenticate(config.token);
52
53
54
- authentication: config.token,
55
56
57
0 commit comments