Retrieving filled in username from LoginOverlay

I’m trying to access the filled in username in the form of com.vaadin.flow.component.login.LoginOverlay.LoginOverlay when clicking ‘Forgot password’.

In the login listener I can access it from the fired event, but in the forgot password listener I can’t. I can’t access the username field directly from the LoginOverlay component either, so what is the recommended approach to retrieve the value?

This is my handler where I want to access the username:

    public void handleForgotPassword(ForgotPasswordEvent event) {
        // fetch username here

This is called by declaring: loginOverlay.addForgotPasswordListener(loginPresenter::handleForgotPassword);

If anyone in the future would be wondering the same thing. This problem can be solved as following:

            .executeJs("return document.getElementById('vaadinLoginUsername').value;")
            .then(String.class, username -> {
                if (StringUtils.isNotBlank(username)) {
                    // Proceed doing stuff with the value

Thank you, Thibalt. Saved me a bit of searching.