I would like to capture the IDENTITY_PROVIDER_FIRST_LOGIN event when it happens. For this purpose, I created a custom EventListenerProvider (and registered the factory as well). The event provider for now does nothing but printing the events triggered:
public class CustomEventListenerProvider implements EventListenerProvider {
public CustomEventListenerProvider() {}
@Override
public void onEvent(Event event) {
System.out.println("********************************************************************");
System.out.println(event.getType().toString());
}
@Override
public void onEvent(AdminEvent adminEvent, boolean b) {}
@Override
public void close() {}
}
even if this piece of code is called ( I checked by attaching the bebugger), the event it is still not sent to the Listener. I tried also storing events, same thing. Only the REGISTER, LOGIN, and CODE_TO_TOKEN are stored in the database. Anybody has an idea what is going on ? is this a keycloak bug ?
Thanks. I am using a slightly modified copy of the “First Broker Login”. After reading your message, I switched the flow to the original “First Broker Login”, but still the event is not captured.
and Yes storage is turned on.
Maybe the event is overridden by the LOGIN event. I am gonna try to get some confirmation in the Keycloak developer group