Open kane-mason opened 2 years ago
You can listen to registering by listening to post
on the users
collection. Something custom for Login does seem like a good idea.
@thomas4019 any suggestions for the login listener? I can see cases for both before the doLogin
and after.. I can also see a case for allowing a replace of the entire login handler for those who have MFA login, or want to login with something other than email
like a cell
number
I'd recommend only adding as much as you feel is needed for your use case. Also, supporting alternative login types is currently probably easier by modifying the expressa
codebase directly rather than adding/implementing some new handler system.
I think a beforeLogin
and afterLogin
seems sufficient to me.
it would be great to be able to define listners for a register and login request
one such use case is to mange complex login scenarios such as social login, multifactor authentication etc