Integrating Okta

I am integrating Okta into my application which is really a single page application meaning so far it only has one Route and that is / and I hope to keep it this way.
There are many ways to integrate okta I choose the sdk way so directly calling apis hence no okta spring boot starter or any spring security feature, I want to keep it simple. Okta perfectly fits my need for both social login as well as user store.
Coming back to where I am currently I am able to integrate call back url and handler plus I have now second step too so I got hold of JWT token together with its claim for user information, so in short okta part I am done. Now, there is a bit of vaadin struggle and I will explain how.
With Vaadin I go freestyle for some reason frontend is not my strength and I doubt myself so here we go :
I created a Div component that has my auth redirect_uri as below (this is my test code but still correct me where I am doing wrong) :

@Route("authorization-code/callback")
public class AuthorizationComponent extends Div implements HasUrlParameter<String> {

	/**
	 * 
	 */
	@Override
	public void setParameter(BeforeEvent event, @OptionalParameter String code) {
		Location location = event.getLocation();
		QueryParameters queryParameters = location.getQueryParameters();
		Map<String, List<String>> parametersMap = queryParameters.getParameters();
		try {
			if (parametersMap != null && (parametersMap.containsKey("code"))) {
				List<String> codes = parametersMap.get("code");
				String token = Services.get(OktaAuthService.class).getToken(codes.get(0));
				assert token != null;
			}
		} catch (IOException | JwtVerificationException ioe) {
			ioe.printStackTrace();
		}
		event.getUI().navigate(NewitterUI.class);
	}

}

I made this OktaAuthService that has lots of okta sdk calls as well as jwt verfication etc. Now, I have all the user info ideally it also started a session at okta server for this token.
For the vaadin part I want to do this :

  1. Start a new session with this user and redirect to main page with this session info and
  2. main page then will reload and based upon the session info site features will be visible.

If you see above code snippet right now I am yet to do part 1 but part 2 I try to get hold of UI and then navigate to my main class that has main route :

@Route(value = "")
@EnableGoogleAnalytics(value = "xxxyxyxy", pageviewPrefix = "/", devLogging = LogLevel.NONE, sendMode = SendMode.ALWAYS)
@BodySize
public class NewitterUI extends Div
		implements RouterLayout, PageConfigurator, TrackerConfigurator, HasUrlParameter<String> {

And I see a blank screen and no exception, to me it looks like that Div component is loaded but thats it.it has all other component which are created in its constructor those are not added to the UI.
Also any help regarding how to manage session from here would be great, associating a user etc to session is enough and all
protected component/features to check about it before rendering etc ?

Ok I have fixed it by using event.forwardTo() and here I can navigate to main ui with additional query parameter if I wants to. Also, I was able to create session for some reason I used wrong package com.vaadin.server.VaadinSession this always remained null, only when I switched to com.vaadin.flow.server.VaadinSession I got hold of session and able to use it.