Vaadin Login Using Spring Security

I’m trying to build Login form as Bakery app does:

  1. Build Vaadin Project Base Spring : https://vaadin.com/start/v10-project-base-spring
  2. Config Spring Security via SecurityConfiguration.java
  3. Copy Login, User, LoginView v.v. from Bakery App Source.

But when run it shows empty page (image in attached file) without any error in application log console.

Please show me configuration which i miss.

PM: Sorry if I’m not good at English

17240342.png

I Have fixed this problem with remove this row: .anyRequest().hasAnyAuthority(Role.getAllRoles()).

Hi Duyen Le,

we added a new tutorial: https://vaadin.com/tutorials/securing-your-app-with-spring-security

It explains the security configuration in detail and might help you.

CU,
Paul

Hi I am trying to use Vaadin-13-spring boot(for backend) & spring security(basically using authorization provider like dex(from core-os- similar to Okta) to login through github for my application i.e I am not using spring security’s default login page or any customized jsp login, the application directly logs in through github login page). My issue is how do I configure vaadin to use this configuration. So for example /home route (Main view) should be visited if I am logged into github, but now when I go to https://localhost:8080/home it directly shows me the Main View(I first want it to go to the github login & once the user is authorized/authenticated he should be directed to any page in the vaadin application he has requested in this case /home). I am attaching the screenshot of the page I used to route to when I used to access /home page via the githublogin. Now I want to direct to /home uri which is @Route(/home) in MainView and display helloWorld h1 tag. It would be really of great help if you could guide me with this.
17761400.png