I have IdentityServer and my Api running as two separate applications. I am using default ui and everything works so far but I would like to create user in my Api application whenever there is successful user registration in IS so I have my business logic in Api project and authentication logic in IS project. I would then map IS user by his sub
to my Api user on each request.
The idea is I would call "create user" endpoint on my Api from IS whenever a new user is created but I don't know how to catch this event.
I tried to create custom event sink as described here but there is no registration event. I also found a place where the user is being created in default ui here but that is as far as I was able to go.
So my question is: How to run code whenever a user is created in Identity server project?