@svadmin/ui 0.11.0 → 0.11.1
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/package.json
CHANGED
|
@@ -100,6 +100,9 @@
|
|
|
100
100
|
let authChecked = $state(false);
|
|
101
101
|
|
|
102
102
|
$effect(() => {
|
|
103
|
+
// Explicitly track route so auth is re-checked on navigation
|
|
104
|
+
const _route = route;
|
|
105
|
+
|
|
103
106
|
if (!authProvider) {
|
|
104
107
|
isAuthenticated = true;
|
|
105
108
|
authChecked = true;
|
|
@@ -108,7 +111,7 @@
|
|
|
108
111
|
authProvider.check().then(result => {
|
|
109
112
|
isAuthenticated = result.authenticated;
|
|
110
113
|
authChecked = true;
|
|
111
|
-
if (!result.authenticated &&
|
|
114
|
+
if (!result.authenticated && _route !== '/login' && _route !== '/register' && _route !== '/forgot-password' && _route !== '/update-password') {
|
|
112
115
|
navigate(result.redirectTo ?? '/login');
|
|
113
116
|
}
|
|
114
117
|
});
|