Ghost icon indicating copy to clipboard operation
Ghost copied to clipboard

Unable to setup or login with Safari in private browsing mode

Open nmec opened this issue 11 years ago • 5 comments

Issue Summary

It is not possible to setup or login to Ghost when using Safari in private browsing mode as it blocks localStorage.setItem.

Steps to Reproduce

  1. Open a new private window in Safari
  2. Navigate to /admin on Ghost
  3. Enter valid login credentials
  4. Submit form

Expected behaviour: User is logged in to admin Actual behaviour: User is not logged in and no error message is displayed

The same issue also prevents setting up a new blog when using /ghost/setup/two. Note that this affects both Desktop and Mobile versions of Safari.

Technical details:

  • Ghost Version: 0.7.0
  • Client OS: Mac OS X 10.10.5 / iOS 8.4
  • Server OS: Mac OS X 10.10.5
  • Node Version: 0.12.7
  • Browser: Safari 8.0.8 / Mobile Safari
  • Database: SQLite

nmec avatar Sep 12 '15 09:09 nmec

Potentially the issue: https://github.com/simplabs/ember-cli-simple-auth/issues/38, seems that some of the simple-auth stuff needs to gracefully handle when localStorage isn't available.

joelgriffith avatar Oct 01 '15 20:10 joelgriffith

I can confirm this - seeing it in production on

  • Ghost Version: 0.7.1
  • Ghost Branch: stable
  • Ghost Commit: f91f3edaf2a8bb7becdf74258d71e2bce4d2226e
  • Client OS: Mac OS X 10.11.1 El Capitan
  • Server OS: Ubuntu 14.04
  • Nginx Version: Nginx v 1.8.0 reverse proxying to node
  • Node Versions: 0.10.40 and 0.12.7
  • Browser: Safari 9.01

Definitely looks like an issue in Ember code:

ember_console_issue

beane avatar Nov 07 '15 16:11 beane

Ghost's login mechanism leverages localStorage. Safari's private browsing mode disables localStorage and so it disables Ghost's login functionality. Ghost is therefore currently incompatible with Safari's localStorage.

Building in a fallback is being worked on by ember simple auth and so this issue will hopefully disappear once we upgrade to use that feature.

ErisDS avatar Nov 08 '15 13:11 ErisDS

@kevinansfield is this something we can or have already fixed by way of upgrading ember simple auth?

ErisDS avatar Jan 05 '16 12:01 ErisDS

We haven't fixed it yet but it should be possible by switching to the AdaptiveStore, I'll put a PR together

kevinansfield avatar Jan 05 '16 12:01 kevinansfield