DEV Community

Discussion on: Building a NodeJS Web App Using PassportJS for Authentication

Collapse
 
sama profile image
Samaila Bala

I think sequelize modified their doc. I had to do this

Users.beforeCreate(user => {
    user.password = bcrypt.hashSync(
      user.password,
      bcrypt.genSaltSync(10),
      null
    );
  });

before it worked. Check out the doc Hooks

Thread Thread
 
selvaonline profile image
Selvakumar Murugesan

Can we use this authentication for Electron Desktop App too?

Thread Thread
 
sama profile image
Samaila Bala

I have no idea as I haven't used Electron