Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with Vaadin 18 #6

Open
olijaun opened this issue Feb 4, 2021 · 3 comments
Open

Problems with Vaadin 18 #6

olijaun opened this issue Feb 4, 2021 · 3 comments

Comments

@olijaun
Copy link

olijaun commented Feb 4, 2021

Hi

I'm completely new to Vaadin. This projects seems to be a good starting point for me because I will need oauth authentication for my project. It runs fine on my machine.

However if I try to change this to Vaadin 18 it doesn't work anymore. I'm using the vaadin generator to create a pom.xml for vaadin 18 and then I basically add the spring-boot-starter-oauth2-client dependency. I also had to change ServletHelper to HandlerHelper in SeucrityConfiguration. It compiles and it starts. However when I click on "Login with Google" there appears a page saying "Could not navigate to 'oauth2/authorization/google'". If I enter the url /oauth2/authorization/google into the browser manually and I hit enter (so basically performing a GET) it works and I'm logged in.

The reason for this seems to be that it tries to POST to the given URL. WIth vaadin 14 it does a GET.

So being new to Vaadin I don't know really what to do... It would be great if you could give me a hint or maybe even create a vaadin 18 version of this project.

Thanks a lot! Regards
Oliver

@rubenqba
Copy link

Same behavior happens on Vaadin 21.

@Charismara
Copy link

This can be fixed my adding gplusLoginButton.getElement().setAttribute("router-ignore", true); in the LoginScreen.class above add(gplusLoginButton);

@Avec112
Copy link

Avec112 commented Nov 27, 2021

I posted a link to this issue on OpenStack and the solution @Charismara gave is confirmed to work.
https://stackoverflow.com/questions/70082575/vaadin-21-flow-spring-security-oauth2-couldnt-find-route-for-oauth2-authori/70131144#70131144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants