Skip to content

Commit

Permalink
fix: properly detect wront username or password
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleface committed Nov 9, 2018
1 parent f8a1c1b commit 158c915
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/index.js
Expand Up @@ -38,10 +38,7 @@ function authenticate(username, password) {
url: `https://secure.fr.vente-privee.com/authentication/login/FR?ReturnUrl=https%3a%2f%2fsecure.fr.vente-privee.com%2fns%2ffr-fr%2fhome%2fdefault%2fclassic`,
formSelector: 'form#authenticationForm',
formData: { Mail: username, Password: password },
validate: statusCode => {
log('info', statusCode)
return statusCode === 200 || log('error', 'Invalid credentials')
}
validate: (statusCode, $) => !$('#mdp').length
})
}

Expand Down

0 comments on commit 158c915

Please sign in to comment.