Open AdaptGit opened 2 days ago
I am not sure to see where the issue lies here.
Some reviews about the code example you provided:
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
db
will use and sign in as namespace auth because you call these methods manuallyFrom 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.
Are you sure this is the intended purpose?
Hi @Odonno
I wrote this to show the difference between both connection methods and results. (probably should of explained it better in the code.)
further to this i'm able to connect via surrealist using namespace auth.
let me know if i need to provide any extra details if required
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