@digilogiclabs/platform-core 1.28.1 → 1.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/auth.js CHANGED
@@ -353,6 +353,10 @@ function buildKeycloakCallbacks(config) {
353
353
  */
354
354
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
355
355
  async session({ session, token }) {
356
+ if (token.error === "RefreshTokenError") {
357
+ const { user: _revoked, accessToken: _stale, ...rest } = session;
358
+ return { ...rest, idToken: token.idToken, error: token.error };
359
+ }
356
360
  const user = session.user;
357
361
  if (user) {
358
362
  user.id = token.id || token.sub;