fix: improve login redirect reliability by using window.location for navigation
Build And Push Image / docker (push) Successful in 2m54s Details

This commit is contained in:
Matt 2025-08-07 14:31:46 +02:00
parent 789ecd7eab
commit aa541fcc5c
1 changed files with 5 additions and 2 deletions

View File

@ -186,9 +186,12 @@ const handleLogin = async () => {
});
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);
await navigateTo(result.redirectTo || '/dashboard');
const redirectUrl = result.redirectTo || '/dashboard';
// Use window.location for a reliable redirect
window.location.href = redirectUrl;
} else {
loginError.value = result.error || 'Login failed. Please check your credentials and try again.';
}