How to implement BeforeLoginEvent

Hi there,
I used BeforeLoginEvent in cuba-platform.
Now I want to use it in Jmix as well. But it was not found in Jmix.
When a user logging in, if the user’s project is not yet active, the user should not be able to log in.
What should I do to solve this?

Thanks,
Nurmuhammad

Hi Nurmuhammad,

Consider using Authentication Events.

Hi @nurmuhammad.abdurash,

You can use

@EventListener
    public void onPreAuthenticationCheckEvent(PreAuthenticationCheckEvent event) {
        ////////////
    }

It is not in documentation but one of the forum post by @krivopustov mentioned it.
https://forum.jmix.io/t/more-missing-changed-undocumented-functionality-login-events/797/2

It is working.

Hey, its working…
Thanks for advice @umeshhodwala