fix: improve login redirect reliability by using window.location for navigation
All checks were successful
Build And Push Image / docker (push) Successful in 2m54s
All checks were successful
Build And Push Image / docker (push) Successful in 2m54s
This commit is contained in:
@@ -186,9 +186,12 @@ const handleLogin = async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
// Handle redirect from the component
|
// Handle redirect from the component using window.location for reliability
|
||||||
console.log('🔄 Login successful, redirecting to:', result.redirectTo);
|
console.log('🔄 Login successful, redirecting to:', result.redirectTo);
|
||||||
await navigateTo(result.redirectTo || '/dashboard');
|
const redirectUrl = result.redirectTo || '/dashboard';
|
||||||
|
|
||||||
|
// Use window.location for a reliable redirect
|
||||||
|
window.location.href = redirectUrl;
|
||||||
} else {
|
} else {
|
||||||
loginError.value = result.error || 'Login failed. Please check your credentials and try again.';
|
loginError.value = result.error || 'Login failed. Please check your credentials and try again.';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user