Skip to content

v2.3.0

Latest
Compare
Choose a tag to compare
@NSeydoux NSeydoux released this 14 Nov 15:51
5391f75

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 a Session from storage.

Feature

node

  • It is now possible to build a Session using getSessionFromStorage and not log it in
    using its refresh token. To do so, a new refresh optional flag has been introduced.
    It defaults to true, 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