From b2fdeb037395ddf4b87ba477386f8595853a0f5d Mon Sep 17 00:00:00 2001 From: Fabian Becker Date: Tue, 9 Sep 2014 23:44:38 +0000 Subject: [PATCH] Add authentication scope. closes #3982 - Set custom key to use in localStorage based on subdir --- ghost/admin/initializers/authentication.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ghost/admin/initializers/authentication.js b/ghost/admin/initializers/authentication.js index 9435e5e13c..59cd95bb81 100644 --- a/ghost/admin/initializers/authentication.js +++ b/ghost/admin/initializers/authentication.js @@ -28,6 +28,9 @@ var AuthenticationInitializer = { return this._super(url, data); } }); + SimpleAuth.Stores.LocalStorage.reopen({ + key: 'ghost' + (Ghost.subdir.indexOf('/') === 0 ? '-' + Ghost.subdir.substr(1) : '') + ':session' + }); } };