@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.mjs CHANGED
@@ -221,6 +221,10 @@ function buildKeycloakCallbacks(config) {
221
221
  */
222
222
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
223
223
  async session({ session, token }) {
224
+ if (token.error === "RefreshTokenError") {
225
+ const { user: _revoked, accessToken: _stale, ...rest } = session;
226
+ return { ...rest, idToken: token.idToken, error: token.error };
227
+ }
224
228
  const user = session.user;
225
229
  if (user) {
226
230
  user.id = token.id || token.sub;