Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export class MainView extends Layout {
`;
}

private logout() {
logout();
private async logout() {
await logout();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Endpoint calls might be rejected for invalid CSRF during the brief period between the logout request and the logout response, which updates the CSRF token. This was causing an error in IT test.

The UI should await until the logout resolves before navigating to the logout success location.

Router.go(router.urlForName('public'));
}
private getMenuRoutes(): RouteInfo[] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ protected void configure(HttpSecurity http) throws Exception {
// Spring CSRF is not compatible with Vaadin internal requests
http.csrf().ignoringRequestMatchers(
requestUtil::isFrameworkInternalRequest);
// nor with endpoints
http.csrf().ignoringRequestMatchers(requestUtil::isEndpointRequest);

// Ensure automated requests to e.g. closing push channels, service
// workers,
Expand Down