mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-25 12:08:21 +02:00
Good progress on 2FA/OTP config: Most of email register lifecycle complete
This commit is contained in:
parent
3efea3de9a
commit
94747cfe7e
4 changed files with 107 additions and 60 deletions
|
@ -370,6 +370,7 @@ function twoFactorAuthOTP(user) {
|
|||
const {
|
||||
OTPTypes,
|
||||
prepareOTP,
|
||||
createBackupCodes,
|
||||
} = require('../../core/user_2fa_otp.js');
|
||||
|
||||
let otpType = argv._[argv._.length - 1];
|
||||
|
@ -414,7 +415,7 @@ function twoFactorAuthOTP(user) {
|
|||
qrType : argv['qr-type'] || 'ascii',
|
||||
};
|
||||
prepareOTP(otpType, otpOpts, (err, otpInfo) => {
|
||||
return callback(err, Object.assign(otpInfo, { otpType }));
|
||||
return callback(err, Object.assign(otpInfo, { otpType, backupCodes : createBackupCodes() }));
|
||||
});
|
||||
},
|
||||
function storeOrDisplayQR(otpInfo, callback) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue