Fix logout navigation to use window.location.href
Use window.location.href instead of navigateTo for API route to ensure proper server-side logout handling.
This commit is contained in:
@@ -3,7 +3,7 @@ const { loggedIn, user, clear } = useUserSession()
|
|||||||
|
|
||||||
const logout = async () => {
|
const logout = async () => {
|
||||||
await clear()
|
await clear()
|
||||||
await navigateTo('/api/auth/logout')
|
window.location.href = '/api/auth/logout'
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user