fusionauth-issues icon indicating copy to clipboard operation
fusionauth-issues copied to clipboard

Webhook Event user.registration.update.complete not sending updated roles

Open sjswami opened this issue 2 years ago • 1 comments

Event user.registration.update.complete not sending updated roles

Description

The Webhook event user.registration.update.complete is invoked with any user role is added into the registed app. In event we are not receiving the new added role name. And on removing a role, in the webhook event data we are getting Role name which is removed.

Affects versions

1.40

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to Webooks and enable the user.registration.update.complete event. Also enable in Tenant
  2. Click on User
  3. Click on Manage
  4. On Application click Edit
  5. Select a Role and click on save
  6. Observe the Event object event.original.roles
  7. Value will be empty array which is as expected
  8. Observe the Event object event.registration.roles
  9. Value will be empty array which is not expected, role name should appear

Expected behavior

In the event object event.registration.roles newly selected event name should come in array

Screenshots

image

Platform

(Please complete the following information)

  • Device: Desktop
  • OS: Windows
  • Browser chrome + latest version [e.g. chrome, safari plus a version]
  • Database [PostgresSQL] & and 12.12

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

Additional context

None

sjswami avatar Sep 26 '22 18:09 sjswami

Thanks for filing @sjswami !

I have replicated this on 1.40.1.

The value in event.original.roles is the same as the value in event.registration.roles, when the latter should be the new role.

You can see this here: https://requestbin.com/r/en46qikwl3yl7/2FRgrfdDa6Erau1brjgReHp21Lb

To replicate:

  • set up a user.registration.update.complete webhook listener.
  • modify a user's role using the admin UI
  • modify the user's role again

Expected: the new role shows up under registrations. Reality: old role shows up in both places.

mooreds avatar Sep 29 '22 14:09 mooreds

Internal:

  • Review entire user and registration object being sent in this event. Check for custom user data, custom registration data and roles.

robotdan avatar Feb 28 '23 04:02 robotdan

Any progress in fixing this bug. When we can expect to be released.

sjswami avatar Mar 09 '23 15:03 sjswami

Internal:

  • https://github.com/FusionAuth/fusionauth-app/pull/281

lyleschemmerling avatar Jul 14 '23 23:07 lyleschemmerling