OAuth2 integration problem

When you go to login view it shows a hyperlink, which when pressed redirects to discord authorization. After pressing “authorize” it redirects me to the application displaying https://dev.3mod.eu/brave_05-09-2022_eLUcW0G21q.png
I’ve tried everything I could find on the web, to no avail so I’m asking for help.

application.properties: https://dev.3mod.eu/idea64_05-09-2022_YGXGNkC7XT.png
LoginView.java: https://dev.3mod.eu/idea64_05-09-2022_UBgoBZvQXr.png
SecurityConfiguration.java: https://dev.3mod.eu/idea64_05-09-2022_acvPDGodZP.png

Add loginLink.getElement().setAttribute(“router-ignore”, true);

LoginView.java: https://dev.3mod.eu/idea64_05-09-2022_UBgoBZvQXr.png


Now spring security can handle this click and redirect your users - but I’m not sure if your URL is correct tho (edit: looks okay)

With the previous message I wanted to emphasize that it is already in the code

Oh… sorry missed that previous… that sound strange… what error did you observe then? Something in the logs? Enabled spring security debugging?

I debugged it didn’t help much, in general it looks like this:
After redirecting, vaadin spits out “couldn’t navigate to”, while after hitting the link in the browser and pressing enter it works

Oh… just looked at your security config, you can try to change the order of super. and your oauth2() call to see if that changes it

i also tried

and it doesn’t work :||

Please try again :frowning_with_open_mouth: with router-ignore=true and the oauth2 after super it has to work

After all, I wrote that I tried it and it didn’t do anything. I checked every possible option I could find and it doesn’t work for me.

@practical-rat do you have an idea what could cause this?

I performed the test on two different browsers so it looks like a bug

Oh… brave isn’t really supported… that’s an really interesting observation! Opening an issue on the vaadin flow’s GitHub repo could be worth it

Yes, please open a ticket at https://github.com/vaadin/flow. If the browser is not supported, you should have at least received a sensible error or warning message.