We currently have the low-level Event Listener SPI, but IMO it's not very user friendly.
I propose we add two higher level SPIs with a more user friendly API. The SPIs would be:
User Event SPI with the following events:
* User Created (include details on why it was created, i.e. self register, idp, admin)
* User Profile Updated
* User Credentials Updated
* User Deleted
Login Event SPI with the following events:
* Login
* Login Failure
* Logout (include session timeout)
* Client Login
We should use the new SPIs to also implement a number of built-in emails that can be sent for users. Each email would be optional. Examples could be:
* Welcome mail
* Login on new device notification
* Login failure notification
* Password updated notification