๐ feature request
Description
Add Two Factor support on the back-end.
Describe the solution you'd like
Add the add the ability to enable two factor authentication via the API end points POST /account/two-factor to start the process of enabling two factor then a route /account/two-factor/:token
Bonus is to get it working on the auth end. When a user logins in /auth/login and two factors is enabled it will send a token from TwoFactor.js model which must be used on /auth/two-factor with the users' token.
TwoFactor.js model looks like the following
token,
user: ref.user
expireAt: make sure to use mongodb expire here so it will be removed after it expired automated.
Must use 'otplib' for making the two factor codes and verifying them. And qrcode to return the QRCode sent on /account/two-factor that starts the processes of enabling two factor