"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "plugins/two-factor-auth/frontend/app.js" between
countly-server-20.04.1.4.tar.gz and countly-server-20.04.1.5.tar.gz

About: countly-server is a mobile & web analytics, push notifications and crash reporting platform. This is the server part that collects and analyzes data while individual client SDKs (mobile, web or desktop) send the data. Community Edition (commercial Enterprise Edition also available).

app.js  (countly-server-20.04.1.4):app.js  (countly-server-20.04.1.5)
skipping to change at line 141 skipping to change at line 141
}); });
}); });
} }
else { else {
next(); next();
} }
}); });
// modify login flow // modify login flow
app.post(countlyConfig.path + '/login', function(req, res, next) { app.post(countlyConfig.path + '/login', function(req, res, next) {
members.findByUsernameOrEmail(req.body.username, function(member) { members.login(req, res, function(member) {
// if member exists and 2fa is enabled globally or for the user // if member exists and 2fa is enabled globally or for the user
if (member && (member.two_factor_auth && member.two_factor_auth. enabled || plugins.getConfig("two-factor-auth").globally_enabled)) { if (member && (member.two_factor_auth && member.two_factor_auth. enabled || plugins.getConfig("two-factor-auth").globally_enabled)) {
// if 2fa is not set up for the user // if 2fa is not set up for the user
if ((member.two_factor_auth === undefined || member.two_fact or_auth.secret_token === undefined) && if ((member.two_factor_auth === undefined || member.two_fact or_auth.secret_token === undefined) &&
(req.body.auth_code === undefined || req.body.secret_tok en === undefined)) { (req.body.auth_code === undefined || req.body.secret_tok en === undefined)) {
const secretToken = GA.generateSecret(); const secretToken = GA.generateSecret();
generateQRCode(member.username, secretToken, function(er r, svg) { generateQRCode(member.username, secretToken, function(er r, svg) {
if (err) { if (err) {
console.log(`Error generating QR code: ${err}`); console.log(`Error generating QR code: ${err}`);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)