Ghost: No helpful errors when attempting to login without email setup
Issue Summary
After upgrading from ghost:5.117.0-alpine to ghost:5.118.0-alpine, admin login is broken: no cookies are set in the browser, and Ghost logs show 403 errors with “Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication.”
Rolling back to ghost:5.117.0-alpine or earlier resolves the issue.
Steps to Reproduce
- Deploy Ghost using Docker with the ghost:5.118.0-alpine or ghost:5.118.1-alpine image.
- Use a standard nginx reverse proxy (as per this tutorial).
- Try to log in to /ghost/#/signin from a new browser or incognito window.
- Observe that no cookies are set and login fails with a 403.
- Revert Docker with ghost:5.117.0-alpine
- Try to log in to /ghost/#/signin from a new browser or incognito window. Login works successfully.
- Redeploy with the ghost:5.118.x-alpine image and try to login again. Login fails as described in (4)
If using the same browser that did the initial set-up, then the cookie is already set and login can be completed successfully.
Ghost Version
5.118.0 / 5.118.1
Node.js Version
v18.20.8
How did you install Ghost?
docker-alpine in a Hetzner VPS (Arm64 CAX11); via docker compose as per https://community.hetzner.com/tutorials/ghost-cms-on-arm64-debian
Database type
MySQL 8
Browser & OS version
Tested on MacOS Sequoia: Zen (Firefox) / Chromium / Safari; Android 15: Iceraven (Firefox), Chrome
Relevant log / error output
[2025-04-26 21:06:34] ERROR "GET /ghost/api/admin/users/me/?include=roles" 403 6ms
Authorization failed
"Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication."
Error ID:
55d2b170-22e2-11f0-90d2-31b40eaea8c0
----------------------------------------
NoPermissionError: Authorization failed
at authorizeAdminApi (/var/lib/ghost/versions/5.118.1/core/server/services/auth/authorize.js:33:25)
at Layer.handle [as handle_request] (/var/lib/ghost/versions/5.118.1/node_modules/express/lib/router/layer.js:95:5)
at next (/var/lib/ghost/versions/5.118.1/node_modules/express/lib/router/route.js:149:13)
at authenticate (/var/lib/ghost/versions/5.118.1/core/server/services/auth/session/middleware.js:55:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Code of Conduct
- I agree to be friendly and polite to people in this repository
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 19 (5 by maintainers)
Commits related to this issue
- 🎨 Fixed infinite wait when auth code email fails to send in Direct mode fixes https://github.com/TryGhost/Ghost/issues/23050 When email is configured to use Direct mode, it can take over 15 minutes... — committed to PaulBernhardt/Ghost by PaulBernhardt a year ago
- 🎨 Fixed infinite wait when auth code email fails to send in Direct mode fixes https://github.com/TryGhost/Ghost/issues/23050 When email is configured to use Direct mode, it can take over 15 minutes... — committed to PaulBernhardt/Ghost by PaulBernhardt a year ago
- 🎨 Fixed infinite wait when auth code email fails to send in Direct mode fixes https://github.com/TryGhost/Ghost/issues/23050 When email is configured to use Direct mode, it can take over 15 minutes... — committed to PaulBernhardt/Ghost by PaulBernhardt a year ago
Holy moly this took an hour of my life. Thank you to @pong106 for the workaround my goodness. No error messages, nothing in the logs even in debug mode. How does stuff like this get past QA?
I added
to my compose file and can now login again.
Yeah this was frustrating. Thanks for the fix. More frustrating that I encountered it intermittently after deploy 3 separate sites. There are zero error messages that indicate what’s going on, which is bad DX @ErisDS
Thank goodness! That’s exactly what I needed. I was on the verge of rebuilding my blog from the beginning today.
I second this. There have been so many published guides on how to pull this off because it’s not feasible for many. After this update hit I can’t login to admin panel without figuring out how to again setup mailgun which honestly, many don’t want to use. Would have been nice to have a heads up and trial this option not making it required by default giving self-hosting community time to deal with setup before being locked out.
Thanks for replying @ErisDS ! This makes sense as email wasn’t (isn’t) configured yet in my freshly setup blog, so ghost couldn’t have sent emails for verification.
However what I don’t understand then is:
ERRORseverity on the logs (from the browser point of view, the failure on the login page was completely silent and the page just hung).I think I saw some
INFOmessages about email, but nothing that sounded too ominous. I’ll try to get you more logs / info so you can see whether this is expected behavior or a genuine issue.In any case, different problem but there are dozens of tutorials out there for setting up ghost that assume that email isn’t required but very much an optional step; it’d be great to update documentation to say it’s now a hard requirement. This might make it inviable for some applications like internal documentation for teams on self-hosted environments where it’s not feasible/practical to have a mailserver.