You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given an application with views protected by authentication (HttpServletRequest.getUserPrincipal() != null) and a logout functionality that redirects the browser to a public page, if frontend reload is enabled (Vite client) on logout the redirection is cancelled and the current page is reloaded.
This happens because the Vaadin Vite websocket proxy gets closed on session invalidation, and Vite client performs a page reload concurrently with the redirection issued by the logout process via HTTP Location header.
Expected behavior
The browser is redirected to the configured logout landing page.
Start the application, enter the user credentials on the login page and submit the form. On the main view press the Invalidate session and redirect button.
Observe that the login page is shown instead of the logout view
If you disable frontend hotdeploy and try again, after logout the browser is correctly redirected to the logout view.
Versions
Vaadin / Flow version: 24.6 (Most likely also all previous versions)
Java version: 21
OS version: Linux
The text was updated successfully, but these errors were encountered:
Description of the bug
Given an application with views protected by authentication (
HttpServletRequest.getUserPrincipal() != null
) and a logout functionality that redirects the browser to a public page, if frontend reload is enabled (Vite client) on logout the redirection is cancelled and the current page is reloaded.This happens because the Vaadin Vite websocket proxy gets closed on session invalidation, and Vite client performs a page reload concurrently with the redirection issued by the logout process via HTTP
Location
header.Expected behavior
The browser is redirected to the configured logout landing page.
Minimal reproducible example
Clone or download the Flow spring starter from https://github.com/vaadin/skeleton-starter-flow-spring
Add Spring Security starter dependency to the POM file
Create the following views
Configure Spring Security to redirect to
LogoutView
after logoutEnable frontend hotdeploy, both on vaadin-maven-plugin configuration and application.properties
Start the application, enter the user credentials on the login page and submit the form. On the main view press the Invalidate session and redirect button.
Observe that the login page is shown instead of the logout view
If you disable frontend hotdeploy and try again, after logout the browser is correctly redirected to the logout view.
Versions
The text was updated successfully, but these errors were encountered: