fix: ensure session cookie is properly read by forcing page reload on login success
All checks were successful
Build And Push Image / docker (push) Successful in 2m53s
All checks were successful
Build And Push Image / docker (push) Successful in 2m53s
This commit is contained in:
@@ -192,8 +192,9 @@ const handleLogin = async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
// Success! Redirect will be handled by the API response
|
// Force a page reload to ensure the session cookie is properly read
|
||||||
await navigateTo(response.redirectTo || '/dashboard');
|
// This is more reliable than trying to update the auth state manually
|
||||||
|
window.location.href = response.redirectTo || '/dashboard';
|
||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error('Login error:', error);
|
console.error('Login error:', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user