Please describe the expected behaviour of the issue, starting from the first action.
After user clicks Email confirmation link, I would like to send him “Password recovery by link” email. I wanted to achieve this by using beforeEmailConfirmed or afterEmailConfirmed event handlers
Actual Behavior
I have tried with both triggers, putting there a different logic, just to achieve any result, but it looks like event handlers are not triggered.
Sorry you had to wait, we already have the results of your case. At this time, you need to write your own email confirmation logic. What you need to do:
Disable email confirmation in the app;
Create an API service that will accept the user’s identity. Add logic to the service that will change the user’s state to ENABLED and send the user an email with the new password.
Create an afterRegister event handler that sends a confirmation email to the user with the API service link attached and sets the user state to EMAIL_CONFIRMATION_PENDING.