[x] 1. The getAuthCode user argument should be object with username or email property. Cause current way deny us to use @ in username.
[ ] 2. Add functions/methods for more usecases - for example fire method which generate code for logged in user. So we can put just some actions behind 2way auth. Could be useful for password changes etc... too.
[ ] 3. And also put the function which check the code directly into twoFactor server side object, so we can use it in our own methods which handle functionality behind already logged in user for functionality which need to be behind code check.
user
argument should be object withusername
oremail
property. Cause current way deny us to use@
in username.I can prepare PR if needed.