Problem with forwardTo with parameters

Hi,
can someone please confirm if this is a bug or if I am doing something wrong?
Tested with Vaadin 14.4.3.

  1. LoginView (@route = login)
  2. MainView (@route = main)

When I open http://127.0.0.1/login?id=1234 I want to authenticate and then move to http://127.0.0.1/main?id=1234
I am using the BeforeEnterObserver to check if the user is already authenticated.
That works fine.

But I have a strange behaviour when using forwardTo compared to rerouteTo

	event.forwardTo(MainView.class);         becomes            http://127.0.0.1/main (parameters are missing)
	event.rerouteTo(MainView.class);         becomes            http://127.0.0.1/login?id=1234   (I guess thats expected, that the URL is not changed but the UI is updated and the parameters exists).

I guess now, that forwardTo should forward and change the URL but also should keep the URL parameters, or am I wrong?

I found the following ticket from Olli therefore I guess this is a bug:
https://github.com/vaadin/flow/issues/7680

Currently, when you use rerouteTo or forwardTo, original query parameters should be retained

In my case, the parameter are not retained when using forwardTo.
I will make some further tests before raising a ticket.

li n83:
I found the following ticket from Olli therefore I guess this is a bug:
https://github.com/vaadin/flow/issues/7680

Currently, when you use rerouteTo or forwardTo, original query parameters should be retained

In my case, the parameter are not retained when using forwardTo.
I will make some further tests before raising a ticket.

Give the github issue a thumbs up, it will help Vaadin to prioritize bugs and enhancements.