Mintplex-Labs / vector-admin

The universal tool suite for vector database management. Manage Pinecone, Chroma, Qdrant, Weaviate and more vector databases with ease.
https://vectoradmin.com/
MIT License
1.01k stars 173 forks source link

[BUG]: We could not log you in - contact an admin. [002] Failed to authenticate #133

Closed LIdro closed 4 months ago

LIdro commented 4 months ago

How are you running VectorAdmin?

Local development

What happened?

I cloned your repository to my local environment and followed the installation steps. I am currently facing the failed to authenticate wall. I am using the email: root@vectoradmin.com and password: password auth-failed-va

Are there known steps to reproduce?

I am new on reporting issues on github and do not master the format yet. Are there any other details I may need to provide to for the community to help me resolve this issue?

I really want to use this tool. It will cut my dev time by a lot. Please help me out.

timothycarambat commented 4 months ago

Can you open up a database explorer and see if the users table has the admin credential created? Also, can you open the network tab before sending login credentials and ensure that the endpoint requests are being sent to is :3001/api/.. and not :3000/api/...

LIdro commented 4 months ago

Can you open up a database explorer and see if the users table has the admin credential created? Also, can you open the network tab before sending login credentials and ensure that the endpoint requests are being sent to is :3001/api/.. and not :3000/api/...

Thanks for the reply.

I guess this is my problem. Please how can I resolve it?

Thanks for the help so far.

network-tab

timothycarambat commented 4 months ago

change the value of VITE_API_BASE in frontend/.env to be VITE_API_BASE='http://localhost:3001/api'

LIdro commented 4 months ago

change the value of VITE_API_BASE in frontend/.env to be VITE_API_BASE='http://localhost:3001/api'

Thanks for the response. I will do it and get back to you.

Then what about the absence of the root account in the users table? How can I make the app to create the record? I know it should concern Prisma. I tried entering it manually but the password is not hashed. I guess there should be another way to go about this. Thanks.

timothycarambat commented 4 months ago

When the system boots up it will attempt to read the users table and auto-create the root account. So unless the database connection string is incorrect then it should automatically do that and enable login!

We will be removing that flow soon with PR https://github.com/Mintplex-Labs/vector-admin/pull/132 So that should simplify things a lot - this detail always causes issues and there are ways to accomplish what it does without making a user that can never been used again

LIdro commented 4 months ago

I have done all I can to get the system to boot. I have tried placing breakpoints when systemInit() is called, I have stopped and restarted the flask api and the frontend server, all so that I can see if the query to create the user is executed but it does not hit any of my breakpoints. I have even created another database and called prisma setup to it. It did all but nothing I do auto creates the root user.

I manually created a root user with password encrypted using bcrypt, 10 but it still will not let me in.

Is there something I am missing or could do? Please I really need this vectorAdmin solution.

Thanks.