Moving Max Attempts to config
This commit is contained in:
@@ -14,6 +14,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'captchaCount': '7',
|
'captchaCount': '7',
|
||||||
'captchaTimeout': '120000', //in milliseconds (seconds multiplied by 1000)
|
'captchaTimeout': '120000', //in milliseconds (seconds multiplied by 1000)
|
||||||
|
'maxAttempts': '3', // max attemps to verify
|
||||||
'messages': {
|
'messages': {
|
||||||
//literally messages lmao
|
//literally messages lmao
|
||||||
'toVerify': 'Please verify that you are not a robot.',
|
'toVerify': 'Please verify that you are not a robot.',
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let attempts = 0;
|
let attempts = 0;
|
||||||
const maxAttempts = 3;
|
const maxAttempts = cfg.maxAttempts;
|
||||||
let validated = false; // Flag to track if user is already validated
|
let validated = false; // Flag to track if user is already validated
|
||||||
|
|
||||||
async function verifyUser(captcha) {
|
async function verifyUser(captcha) {
|
||||||
|
|||||||
Reference in New Issue
Block a user