Login Failed with invalid_request after clean installation

There is something mysterious going on. I had the exact issue yesterday: clean install, empty database, started with just the admin user (in my case, it wasn’t called ‘admin’). But I did not use Docker.

I had a few differences, though: because I had lots of problems binding to 0.0.0.0 when using nginx as a front-end reverse proxy, I’m using a private IP address set up on an ‘alias interface’, as mentioned in the KB instructions for reverse proxy setup.

At the end of this setup, what happened was exactly what you describe:

  1. Logging in with the admin user would always give a Login failed banner and an invalid_request in the logs;
  2. Logging in with a non-existing user would give a 404 User not found.

The first thing I did was to change the admin’s password with:

./cells user set-pwd -u 'USER_LOGIN' -p 'NEW_PASSWORD'

Alas, the password may have been correctly changed (how can I tell?) but I still got the same error.

Then I created another user:

./cells user create -u 'user' -p 'a password'

and tried to log in with this. I got precisely the same error as before.

Finally, I tried to ‘upgrade’ this new user to admin status:

./cells admin user set-profile -u 'USER_LOGIN' --profile 'admin'

While I could confirm that both users were set as admins using:

./cells admin user search

… I still couldn’t log in with either of them!!

To be honest, because I’m always tinkering with Cells, in the hope of getting it to work one day, I’m not quite sure how I eventually managed to get this to work again. I think that it happened automagically after partially restoring the database from an old backup as described in one of my previous posts.