@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 +6 -0
- package/Queries/apiClient.ts +14 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/Queries/apiClient.ts
CHANGED
|
@@ -112,7 +112,20 @@ apiClient.interceptors.response.use(response => (
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
|
|
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
|
}
|