Deprecation notice
- A new signature is introduced for
getSessionFromStorage
in this release. The legacy signature is
deprecated, and could be removed with the next major release.
// Deprecated signature
const session = await getSessionFromStorage(
sessionId,
storage,
onNewRefreshToken,
refresh,
);
// Replacement signature
const session = await getSessionFromStorage(sessionId, {
storage,
onNewRefreshToken,
refresh,
});
Bugfix
node
- The session expiration date (
session.info.expirationDate
) is now correct when loading aSession
from storage.
Feature
node
- It is now possible to build a
Session
usinggetSessionFromStorage
and not log it in
using its refresh token. To do so, a newrefresh
optional flag has been introduced.
It defaults totrue
, which makes this a non-breaking change. In addition, a new signature
is introduced to make it easier to provide the optional arguments:
// Legacy signature only specifying one optional argument
const session = await getSessionFromStorage(
sessionId,
undefined,
undefined,
false,
);
// New signature
const session = await getSessionFromStorage(sessionId, { refresh: false });
Full Changelog: v2.2.7...v2.3.0