Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Vaadin OAuth2 / ServletFilter problem
Hi,
Im trying to get our application to use OAuth2 to authenticate access to a rest-resource.
Im using Springs OAuth2 module. https://projects.spring.io/spring-security-oauth/docs/oauth2.html
Basicly that means enabling OAuth2Client with: @EnableOAuth2Client
Which will then create a filter oauth2ClientContextFilter, that will handle redirect to the authentication server and fetching the oauth2 token.
I can see the filter is added to filterchain, but it seems it is never run.
When i do exactly the same in a pure helloworld-spring boot app, it runs without problem.
Does Vaadin handle the filterchain differently? And if so how do we get this filter to run?
Ok, i have verified that the oauth2ClientContextFilter does actually run like it should.
But when it tries to redirect the user to the authorization-app url, then nothing happens.
This redirect is happening in the oauth2ClientContextFilter
this.redirectStrategy.sendRedirect(request, response, builder.build() .encode().toUriString());
The redirectStrategy is of type
org.springframework.security.web.RedirectStrategy
It seems this does not work with Vaadin?