I have attached the code and image

SecurityConfig.java (1.14 KB)
LoginView.java (1.75 KB)
It’s not recommended to show the user what exactly is wrong. https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html#authentication-and-error-messages
Actually I want to display error message saying either email or password is invalid
Just like this

Isn’t that already done in the screenshot?
yes I hard coded set error to true while creating login form (just for visual reference here), however I want to show this error message once the authentication fails

I would say you don’t need to do anything. Vaadin has first class spring security integration. You can also download an example from start.vaadin.com