User not yet created when user.created event fired
-
Hello, I came a across a strange behaviour, as I was playing with the
user.created
event. I listen to this with a webhook when a new user is created and then I create a user entry on my side, too. But as I have a default application, I wanted to automatically create a registration for this user. This is not needed when it is a self-signup, but only when the user is created in the fusion auth app.I understand now that when the webhook fails, the user does not get created, and that is why the user cannot actually exist yet in the database of fusionauth. But the docs are missleading as they state that the event
user.created
is fired upon a user creation, which indicates the user already exists.
Event: User CreatedDid I understand correct or is there something I have missed?
-
Hmmm. We try to address that complexity here: https://fusionauth.io/docs/v1/tech/events-webhooks/writing-a-webhook/#calling-fusionauth-apis-in-webhooks We also offer some workarounds.
Where would you expect this doc to live?
-
Thanks, that was exactly what I was looking for. I just didn't stumble across this part of the docs.
To your question, I guess it is already at the right place. I would maybe just mention it in the
create
events and link this part of the docs as otherwise (at least in my case where most of the webhooks already work), I did not go back to the generalwebhook
setup docs. -
@cyrill-lippuner PR here: https://github.com/FusionAuth/fusionauth-site/pull/544
Thanks for the feedback!