Log-in window incorrect

fixes #583
This commit is contained in:
Nick O'Leary 2015-03-09 20:01:29 +00:00
parent 4403a00651
commit 0f3cc3196c
1 changed files with 2 additions and 2 deletions

View File

@ -55,13 +55,13 @@ var clientPasswordStrategy = function(clientId, clientSecret, done) {
clientPasswordStrategy.ClientPasswordStrategy = new ClientPasswordStrategy(clientPasswordStrategy);
var loginAttempts = [];
var loginSignUpWindow = 36000000; // 10 minutes
var loginSignInWindow = 600000; // 10 minutes
var passwordTokenExchange = function(client, username, password, scope, done) {
var now = Date.now();
loginAttempts = loginAttempts.filter(function(logEntry) {
return logEntry.time + loginSignUpWindow > now;
return logEntry.time + loginSignInWindow > now;
});
loginAttempts.push({time:now, user:username});
var attemptCount = 0;