accept session as well

This commit is contained in:
AJ ONeal 2017-03-24 09:59:22 -06:00
parent c359ed6ea9
commit f37d47b0d4
1 changed files with 5 additions and 2 deletions

View File

@ -1121,8 +1121,11 @@
return session;
});
}
, session: function () {
return JSON.parse(JSON.stringify(OAUTH3.hooks.session._getCached(this._providerUri) || null));
, session: function (session, id) {
if (!session) {
return JSON.parse(JSON.stringify(OAUTH3.hooks.session._getCached(this._providerUri) || null));
}
return OAUTH3.hooks.session.set(this._providerUri, session, id);
}
, request: function (preq, opts) {
opts = opts || {};