Cannot login after upgrading to 5.0.2

When I enter my admin user and pass, the Login button stays gray and I get the following error in the Firefox console: [HTTP/2 403 Forbidden 14ms]

This was a migration from Debian 11 to Ubuntu 22.04, then an upgrade from 3.48 (I believe) to 5.0.2. I had a few issues with the SQL database, but I got all of that sorted.

Running nginx 1.18.0, MySQL 8.0.29.

The console output you’ve shared is expected. When you go to the admin panel, Ghost checks if you are logged in and if not shows the login screen, so the 403 is expected from that check.

Would be a good idea to run ghost log -f on your server and open the network tab in your browser, and then try to log in again.

That should give you logs both from the browser and server so you can see where it’s going wrong after you hit submit.

ghost log -f returns:

[2022-05-27 06:42:04] ERROR “GET /ghost/api/admin/users/me/?include=roles” 403 5ms

NAME: NoPermissionError
MESSAGE: Authorization failed

level: normal

“Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication.”
NoPermissionError: Authorization failed
at authorizeAdminApi (/var/www/kruugnet/blog/versions/5.0.2/core/server/services/auth/authorize.js:33:25)
at Layer.handle [as handle_request] (/var/www/kruugnet/blog/versions/5.0.2/node_modules/express/lib/router/layer.js:95:5)
at next (/var/www/kruugnet/blog/versions/5.0.2/node_modules/express/lib/router/route.js:144:13)
at authenticate (/var/www/kruugnet/blog/versions/5.0.2/core/server/services/auth/session/middleware.js:28:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)