no session should be null, not '{}'
This commit is contained in:
parent
a2a6a9bcb1
commit
f179cfe3c9
|
@ -538,7 +538,7 @@
|
||||||
}
|
}
|
||||||
, _get: function (providerUri) {
|
, _get: function (providerUri) {
|
||||||
console.warn('[Warn] Please implement OAUTH3.hooks.session._get = function (providerUri) { return PromiseA<savedSession>; }');
|
console.warn('[Warn] Please implement OAUTH3.hooks.session._get = function (providerUri) { return PromiseA<savedSession>; }');
|
||||||
return JSON.parse(window.localStorage.getItem('session-' + providerUri) || '{}');
|
return JSON.parse(window.localStorage.getItem('session-' + providerUri) || 'null');
|
||||||
}
|
}
|
||||||
, _set: function (providerUri, newSession) {
|
, _set: function (providerUri, newSession) {
|
||||||
console.warn('[Warn] Please implement OAUTH3.hooks.session._set = function (providerUri, newSession) { return PromiseA<newSession>; }');
|
console.warn('[Warn] Please implement OAUTH3.hooks.session._set = function (providerUri, newSession) { return PromiseA<newSession>; }');
|
||||||
|
@ -1059,7 +1059,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
, session: function () {
|
, 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) {
|
, request: function (preq, opts) {
|
||||||
opts = opts || {};
|
opts = opts || {};
|
||||||
|
|
Loading…
Reference in New Issue