@spidy092/auth-client 2.1.7 → 2.1.8
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/core.js +6 -9
- package/package.json +1 -1
package/core.js
CHANGED
|
@@ -133,21 +133,18 @@ async function routerLogout(clientKey, authBaseUrl, accountUiUrl, token) {
|
|
|
133
133
|
clearRefreshToken();
|
|
134
134
|
clearToken();
|
|
135
135
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
136
|
+
// Skip Keycloak confirmation page - redirect directly to login
|
|
137
|
+
// Backend has already revoked the session/tokens
|
|
138
|
+
console.log('🔄 Redirecting to login (skipping Keycloak confirmation)');
|
|
139
|
+
window.location.href = '/login';
|
|
142
140
|
|
|
143
141
|
} catch (error) {
|
|
144
142
|
console.warn('⚠️ Logout failed:', error);
|
|
145
143
|
clearRefreshToken();
|
|
146
144
|
clearToken();
|
|
145
|
+
// Still redirect to login even on error
|
|
146
|
+
window.location.href = '/login';
|
|
147
147
|
}
|
|
148
|
-
|
|
149
|
-
await new Promise(resolve => setTimeout(resolve, 5000));
|
|
150
|
-
window.location.href = '/login';
|
|
151
148
|
}
|
|
152
149
|
|
|
153
150
|
function clientLogout(clientKey, accountUiUrl) {
|