Fires in case new user registered in system and authentication schema support
Currently only CERT and UB schemas support this feature.
For CERT schema user registered means
auth endpoint is called with registration=1 parameter.
For UB schema user registered means 'publicRegistration' endpoint has been called and user confirmed
registration by email otp.
Inside event handler server-side Session object is in INCONSISTENT state and you must not use it!!
Only parameter (stringified object), passed to event is valid user-relative information.
For CERT schema parameter is look like
For UB schema parameter is look like
Each AUTH schema can pass his own object as a event parameter, but all schema add
Below is a sample code for CERT schema: