@autobusal/providers 1.40.2 → 1.40.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.40.3
4
+
5
+ ### Fixed
6
+
7
+ - **An expired session interrupted on a private page carries that page through the logout hop** (`/account/logout?return=...`), so signing back in can resume there. (Audit ADM-08a.)
8
+
3
9
  ## 1.40.2
4
10
 
5
11
  ### Fixed
@@ -112,7 +112,20 @@ apiClient.interceptors.response.use(response => (
112
112
  }
113
113
  }
114
114
 
115
- window.location.href = '/account/logout';
115
+ /*
116
+ * Claude - 2026-08-22 (audit finding ADM-08a): when the dead session
117
+ * was interrupted on a private page, carry that page through the
118
+ * logout hop - Logout hands it to the login screen, and a successful
119
+ * sign-in lands back where the bookmark pointed instead of on the
120
+ * storefront with no explanation.
121
+ */
122
+ const here = window.location.pathname;
123
+
124
+ const isPrivate = ['/admin', '/account', '/operator'].some(prefix => here.startsWith(prefix));
125
+
126
+ window.location.href = isPrivate
127
+ ? '/account/logout?return=' + encodeURIComponent(here + window.location.search)
128
+ : '/account/logout';
116
129
 
117
130
  return Promise.reject(error);
118
131
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/providers",
3
- "version": "1.40.2",
3
+ "version": "1.40.3",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"