Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Authentication with Namespace is not working #137

Open
2 tasks done
4F2E4A2E opened this issue Jan 8, 2025 · 1 comment
Open
2 tasks done

Bug: Authentication with Namespace is not working #137

4F2E4A2E opened this issue Jan 8, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@4F2E4A2E
Copy link

4F2E4A2E commented Jan 8, 2025

Describe the bug

There was a problem with the database: There was a problem with authentication

Steps to reproduce

db = AsyncSurrealDB(url=url)
await db.connect()
await db.use(namespace=namespace, database=database)
await db.sign_in(username=user, password=password)


# prior to v0.4.1: db.signin({"user": user, "pass": password, "NS": namespace})

Expected behaviour

Connect.

SurrealDB version

surrealpypi v0.4.1

surrealdb.py version

surrealpypi v0.4.1

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
@4F2E4A2E 4F2E4A2E added the bug Something isn't working label Jan 8, 2025
@huntipl
Copy link

huntipl commented Jan 8, 2025

I was just about to create identical issue, a bit more detail from me:
It is only possible to sign-in to the root system user, namespace and database users fail with surrealdb.errors.SurrealDbConnectionError: There was a problem with the database: There was a problem with authentication
Investigating SDK logs I found that db.use() seems to be executed Arguments: (RequestData(id='RPTcD58SLO', method='use', params=('ns', 'db')),) and then the sign-in gets executed Arguments: (RequestData(id='MSaAz1fh65', method='signin', params=({'user': 'dbuser', 'pass': 'supersecretpass'},)),) and then it fails immediately.

Tested with surrealdb 2.1.4

Only way to sign in is to create a root user which is far from ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants