dani-garcia / vaultwarden

Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden_rs
GNU Affero General Public License v3.0
38.47k stars 1.87k forks source link

Login always fails #766

Closed pete1450 closed 4 years ago

pete1450 commented 4 years ago

Subject of the issue

Fresh install build from source with mysql and I can register accounts and they get into my db. When attempting to log in on the web frontend I always get an error that my username or password is incorrect. I've tried this many times with different emails/passwords. Unsure how to debug going forward.

Your environment

Steps to reproduce

Started with the recommended systemd setup. Enter an email/name/password then attempt to log in with it

Expected behaviour

Should be logged in

Actual behaviour

Incorrect email or password error

Relevant logs

[2019-12-12 23:55:03][request][INFO] POST /api/accounts/prelogin [2019-12-12 23:55:03][response][INFO] POST /api/accounts/prelogin (prelogin) => 200 OK [2019-12-12 23:55:03][request][INFO] POST /identity/connect/token [2019-12-12 23:55:03][error][ERROR] Username or password is incorrect. Try again. IP: 192.168.1.205. Username: . [2019-12-12 23:55:03][response][INFO] POST /identity/connect/token (login) => 400 Bad Request

BlackDex commented 4 years ago

Have you tried to create a new/second account and see if you can login with that? Also, if you login to the /admin page, do you see the username you want to use listed there?

pete1450 commented 4 years ago

I have created a couple different ones and I am receiving the welcome email for them. As to your second question that is a little odd; the admin page show that there is some user but no information about it. There is an icon and it says they are invited but that is all. Also when trying to delete the user from that page it always tells me I have the wrong email in the confirmation.

BlackDex commented 4 years ago

May i ask which mysql database you use? Is that MariaDB?

BlackDex commented 4 years ago

Well, i just did a test build with only mariadb 10.3 libraries installed and bitwaren_rs is linked to libmariadb.so.3 in my case, instead of libmysqlclient.so.20 when using the vanila-mysql. But both versions seem to work just fine, not issues using it.

Could you try the mysql docker build just to rule out build issues?

pete1450 commented 4 years ago

Good idea. I used it pointing to my mysql db and it added a user and let me log in. That seems to point to a build issue. What's odd to me is even the self built version is able to create the tables and add a user to them.

BlackDex commented 4 years ago

Then, try to put the log_level to debug or trace even, see if that shows something specific.

dani-garcia commented 4 years ago

Closed due to inactivity.