You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building a connection string fails when reading, inserting or creating only when using a namespace auth. this use to work in the version 0.5.1. however doesn't work in the latest.
further to this the same connection details can be used to login via the sign in method and this works to read data.
Steps to reproduce
to reproduce this bug create a connection string to database with a namespace authentication method and read some data. This will result in there was a problem with the database and a problem with authentication, this authentication can be used on a sign method check test case below:
`
var surrealDbClient = new SurrealDbClient(SurrealDbOptions
.Create()
.WithEndpoint("ws://127.0.0.1:8000/rpc")
.WithNamespace("Name")
.WithDatabase("db")
.WithUsername("Name_space")
.WithPassword("root")
.Build()
);
var db = new SurrealDbClient("ws://127.0.0.1:8000/rpc");
await db.Connect();
await db.Use("Namespace", "db");
var namespaceAuth = new NamespaceAuth
{
Namespace = "Name",
Username = "Name_space",
Password = "root"
};
await db.SignIn(namespaceAuth);
var getResult = await db.RawQuery("Select * from 1");
Assert.IsFalse(getResult.HasErrors);
var result = await surrealDbClient.RawQuery("Select * from 1");
Assert.IsFalse(result.HasErrors);
`
Expected behaviour
this should work like the signin method, allowing access to the database and to read the data.
SurrealDB version
Running 2.1.0 for macos on aarch64
Package version(s)
Contact Details
No response
Is there an existing issue for this?
I have searched the existing issues
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
The surrealDbClient client is created from options, it will automatically Use the ns/db provided and SignIn as root auth from the user/password on Connect
The db will use and sign in as namespace auth because you call these methods manually
From what I can see in your error output, it is the SignIn method call using the surrealDbClient client that fails. It means that root authentication fails.
Describe the bug
Building a connection string fails when reading, inserting or creating only when using a namespace auth. this use to work in the version 0.5.1. however doesn't work in the latest.
further to this the same connection details can be used to login via the sign in method and this works to read data.
Steps to reproduce
to reproduce this bug create a connection string to database with a namespace authentication method and read some data. This will result in there was a problem with the database and a problem with authentication, this authentication can be used on a sign method check test case below:
`
var surrealDbClient = new SurrealDbClient(SurrealDbOptions
.Create()
.WithEndpoint("ws://127.0.0.1:8000/rpc")
.WithNamespace("Name")
.WithDatabase("db")
.WithUsername("Name_space")
.WithPassword("root")
.Build()
);
var db = new SurrealDbClient("ws://127.0.0.1:8000/rpc");
await db.Connect();
await db.Use("Namespace", "db");
var namespaceAuth = new NamespaceAuth
{
Namespace = "Name",
Username = "Name_space",
Password = "root"
};
await db.SignIn(namespaceAuth);
`
Expected behaviour
this should work like the signin method, allowing access to the database and to read the data.
SurrealDB version
Running 2.1.0 for macos on aarch64
Package version(s)
Contact Details
No response
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: