Make this site private - not working

I made this site private.
But I cannot access the site with the given password.

The console output:
21:12:44.666 localhost/:1 [DOM] Input elements should have autocomplete attributes (suggested: “new-password”): (More info: Create Amazing Password Forms) <input class=​"gh-input" type=​"password" name=​"password" autofocus=​"autofocus" placeholder=​"Password">​

Version: 5.54.3

That’s an informative message from Google, not an error message.
If it’s not working, you can still get to your admin pages at /ghost/ - once there, see if you can reset the private site password (which is not your Ghost password). I’m hoping you just have a typo in the password you set! :)

It still not working. When I click the button “Access site ->”
The given password disappears and the border around the input is green. But nothing more happens.
I am missing the redirect to my website.

Bildschirmfoto 2023-07-18 um 21.45.35

It sounds like something may be blocking the cookie that is set to remember you’re logged in.

As a first step are you able to test in a different browser? If it works then that suggests there is an add-on or some privacy setting that’s preventing the cookie being set in your daily-use browser.

1 Like

You’re right:
It don’t work in: Chrome, Opera
It worked in: Safari, Firefox

In Chrome, the cookie is not set
Bildschirmfoto 2023-07-18 um 23.14.20

In Firefox, the cookie is available:
Bildschirmfoto 2023-07-18 um 23.16.51

But Chrome is my standard-browser - the latest version 115.
I had no issues with cookies in other applications.
I have no addon installed and the private settings allow all cookies.
The Local storage contains the ghost-history. The Session storage is empty. The same as in Firefox.

1 Like

I have found the bug.

Please update the code in
versions/5.54.4/core/frontend/apps/private-blogging/lib/middleware.js
row 58 - privateBlogging

return session({ name: 'ghost-private', maxAge: constants.ONE_MONTH_MS, signed: false, sameSite: 'Lax' <----- row 58: instead of 'none' or delete this row })(req, res, next);
Or you can delete the row 58 because ‘Lax’ is the default value.
You can’t code ‘Secure’ within a object (Secure: true will not work).

Works now in Chrome and Opera.
See https://web.dev/i18n/en/samesite-cookies-explained

1 Like

I have made a bug report in github.

1 Like

hey, can you share your github bug report URL? I also faced the same issue and would like to +1 on your bug report.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.