diff --git a/oauth3.core.js b/oauth3.core.js index d3d1dfe..0756e77 100644 --- a/oauth3.core.js +++ b/oauth3.core.js @@ -538,7 +538,7 @@ } , _get: function (providerUri) { console.warn('[Warn] Please implement OAUTH3.hooks.session._get = function (providerUri) { return PromiseA; }'); - return JSON.parse(window.localStorage.getItem('session-' + providerUri) || '{}'); + return JSON.parse(window.localStorage.getItem('session-' + providerUri) || 'null'); } , _set: function (providerUri, newSession) { console.warn('[Warn] Please implement OAUTH3.hooks.session._set = function (providerUri, newSession) { return PromiseA; }'); @@ -1059,7 +1059,7 @@ }); } , session: function () { - return JSON.parse(JSON.stringify(OAUTH3.hooks.session._getCached(this._providerUri) || {})); + return JSON.parse(JSON.stringify(OAUTH3.hooks.session._getCached(this._providerUri) || null)); } , request: function (preq, opts) { opts = opts || {};