# Considerations for Custom Event Handling in Keycloak

**URL:** <https://forum.keycloak.org/t/considerations-for-custom-event-handling-in-keycloak/25319>\
**Category:** Extending the server\
**Created:** [March 30, 2024, 4:44pm UTC](https://forum.keycloak.org/t/considerations-for-custom-event-handling-in-keycloak/25319 "2024-03-30T16:44:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![UnoBruno](https://avatars.discourse-cdn.com/v4/letter/u/ea666f/32.png) [@UnoBruno](https://forum.keycloak.org/u/UnoBruno)\
**Post date:** [March 30, 2024, 4:44pm UTC](https://forum.keycloak.org/t/considerations-for-custom-event-handling-in-keycloak/25319/1 "2024-03-30T16:44:11Z")

</div>

Hello everyone,  
i have already integrated various IdP’s such as Google, LinkedIn, Facebook, etc. into Keycloak 24.0.2, and the login process works smoothly without any issues. Now, I have a requirement where I want to redirect the users to a custom page(Angular Frontend) after a successful IdP First Login, where the users should complete their profile.

My initial approach was to implement the SPI CustomEventListener. The first idea was to intercept the event IDENTITY\_PROVIDER\_FIRST\_LOGIN EVENT and add attributes to the UserModel. However, the user object is null, and I only receive the following informations from the event.

2024-03-30 17:34:39 2024-03-30 16:34:39,733 INFO [de.XYZ.keycloakeventsprovider.CustomEventListenerProvider] (executor-thread-55) Event:{identity\_provider=linkedin-openid-connect, [identity\_provider\_identity=test@abc.de](mailto:identity_provider_identity=test@abc.de), code\_id=1a262d66-0a45-4a57-93f3-478a121e0893}

I don’t have any information about the username, so I can’t supplement the associated UserModel with attributes.

Furthermore, I’m not sure if the approach I’m taking is the ideal way to meet my requirements.
