bugfix: cache empty session (without session)
This commit is contained in:
parent
5ed05f03cf
commit
c359ed6ea9
|
@ -574,7 +574,8 @@
|
||||||
return OAUTH3.PromiseA.resolve(
|
return OAUTH3.PromiseA.resolve(
|
||||||
OAUTH3.hooks.session._getCached(providerUri, id) || OAUTH3.hooks.session._get(providerUri, id)
|
OAUTH3.hooks.session._getCached(providerUri, id) || OAUTH3.hooks.session._get(providerUri, id)
|
||||||
).then(function (session) {
|
).then(function (session) {
|
||||||
OAUTH3.hooks.session._cache[providerUri + (id || session.id || session.token.id || '')] = session;
|
var s = session || { token: {} };
|
||||||
|
OAUTH3.hooks.session._cache[providerUri + (id || s.id || s.token.id || '')] = session;
|
||||||
if (!id) {
|
if (!id) {
|
||||||
OAUTH3.hooks.session._cache[providerUri] = session;
|
OAUTH3.hooks.session._cache[providerUri] = session;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue