This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const auth = require('@feathersjs/authentication'); | |
| const errors = require('@feathersjs/errors'); | |
| const bcrypt = require('bcryptjs'); | |
| const comparePasswords = (oldPassword, password) => new Promise((resolve, reject) => { | |
| bcrypt.compare(oldPassword, password, (err, data1) => { | |
| if(err || !data1) return reject(); | |
| return resolve(); | |
| }); | |
| }); |
OlderNewer