-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
No helpful errors when attempting to login without email setup #23050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @jrockwar, that's all the expected behaviour with our new Device Verification security feature. https://ghost.org/changelog/2fa/ The 403 error returned from the signin request itself will tell you that a code is required or what's wrong if there was an issue sending the code The 403 from the request to What's curious is you're not getting an error message related to email sending failure or some other issue that clarifies what's going wrong. Are you able to share the log from the actual signin request, which is to the |
Note from our bot: The |
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:
I think I saw some 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. |
This is a less-truncated version of the ghost logs:
So there is a warning in there about the email. Plus if I leave it long enough, there is a... timeout? after 100 seconds. However, interestingly, when I go to Settings > Staff, the setting for 2FA is disabled (note I never disabled it manually - this is how it came by default when I setup the blog on 5.118.1): On the browser side, all I get after 100 seconds is: Nothing is telling me in an obvious way that:
|
I have also tried enabling |
Hey @jrockwar ErisDS left some helpful links to documentation over on the forum: https://forum.ghost.org/t/cant-login-to-admin-dashboard-on-more-than-one-device/57135/3 - worth a read, if you haven't seen it yet. As I understand it, that toggle affects whether all staff logins (new or old device) require a code, vs whether just new devices do. (So it doesn't really turn the behavior off, just reduces it. But the link above includes how to turn the behavior entirely off, if you need to. [It'd probably be better to configure outbound email instead, but...] |
A little update here - all the behaviour of Ghost reported here is expected EXCEPT for the lack of clear error messaging. I definitely want to make all of this more transparent so it's easier to debug and fix, as well as making it clearer that email is required. There's quite a few bits to do around docs and error handling. One thing I don't have on this issue that would be SUPER helpful is a really, really clear reproduction case. E.g. either step-by-step bullets outlining exactly what you did OR a screencast of you going through the motions would be amazingly helpful. It would significantly speed up the time it'll take me to find and resolve the issues, as well as ensure that I get the exact right cases. (To be clear, when I run ghost locally for development I get super clear error messages, so it's not like this is the most obvious case) |
Alternatively of course if anyone else can already reproduce it, fixes are welcome! |
Hi @ErisDS,
Unfortunately I can't reproduce it anymore because now I've set up email properly in my blog, but up until then it was super easy to reproduce. I've written steps to reproduce (on the description).
Set up:
- Create a ghost blog from the docker image I've linked in the description, with v5.118+
- Login to domain.com/ghost (this will work, and initially prompt the blog set up).
After set up:
- After the blog has been set up try logging in again: This will still work
- Open an incognito browser or a browser on any other computer, go to domain.com/ghost: you won't be able to log-in, and the log in will hang.
To "fix" the issue:
- Revert the docker compose image to 5.117, relaunch ghost via docker compose down/up.
- Try to log in on an incognito browser or other computer (that hasn't logged in before): the issue is gone.
- If you then go back to 5.118, login on a new browser hangs again.
alternatively,
- Keep docker on 5.118 but enable email
- Then things work as intended, as the login page sends an authentication email.
The details of my compose .yaml are in the link provided in the description - I followed that tutorial verbatim.
…On May 1 2025, at 1:32 PM, Hannah Wolfe ***@***.***> wrote:
ErisDS left a comment (TryGhost/Ghost#23050) (#23050 (comment))
A little update here - all the behaviour of Ghost reported here is expected EXCEPT for the lack of clear error messaging.
I definitely want to make all of this more transparent so it's easier to debug and fix, as well as making it clearer that email is required.
There's quite a few bits to do around docs and error handling.
One thing I don't have on this issue that would be SUPER helpful is a really, really clear reproduction case.
E.g. either step-by-step bullets outlining exactly what you did OR a screencast of you going through the motions would be amazingly helpful. It would significantly speed up the time it'll take me to find and resolve the issues, as well as ensure that I get the exact right cases.
(To be clear, when I run ghost locally for development I get super clear error messages, so it's not like this is the most obvious case)
—
Reply to this email directly, view it on GitHub (#23050 (comment)), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AHS5OVLJW2KPJ7FYVCW6NTT24IH6TAVCNFSM6AAAAAB354LMROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNBUG42TAOJXGA).
You are receiving this because you were mentioned.
|
temporary fix or bypass to turn off Auth code https://ghost.org/docs/config/#security
|
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. |
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. |
Thank goodness! That’s exactly what I needed. I was on the verge of rebuilding my blog from the beginning today. |
I am not even really clear on how to configure things with my user so I can remove this line either. |
for kubernetes
|
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 |
This definitely worked for casaos. I am grateful |
I spent 2 days of my life looking for an answer to this... thank you, that worked |
Uh oh!
There was an error while loading. Please reload this page.
Issue Summary
After upgrading from
ghost:5.117.0-alpine
toghost: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
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
Code of Conduct
The text was updated successfully, but these errors were encountered: