Trim username
This commit is contained in:
parent
22b536454b
commit
19b660f024
3 changed files with 4 additions and 3 deletions
1
index.js
1
index.js
|
@ -18,6 +18,7 @@ const db = new PouchDB(config.dbUrl);
|
|||
|
||||
passport.use('local', new LocalStrategy(
|
||||
(username, password, done) => {
|
||||
username = username.trim();
|
||||
db.get(username)
|
||||
.then(doc => {
|
||||
bcrypt.compare(password, doc.password, (err, correct) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue