How to encrypt passwords & store in Db ? #nodejs #bcrypt #mysql #express

preview_player
Показать описание
Hii Guys. In this video, I have described how you can encrypt your passwords and store it in your Database. It is important to encrypt your passwords to ensure security. Please watch this video and don't forget to like, share, subscribe and comment, if you have any queries.
The link to download are below :-

2.VS Code:-

3.Nodejs-
------------------------------------------------------------------

Your Queries:-

1.How to develop Rest API's using Nodejs and Mysql?
2.How to use VS Code?
3.Simple tutorial for Nodejs Mysql
4.How to upload images into your MySql Db using NodeJs?
5.How to encrypt your passwords ?

#encryption #protectdata​ #database​ #usingbcrypt
#Tutorial​​ #Codemelon​​ #Nodejs​​ #Mysql​​ #RESTAPI​​ #CRUD​​ #Code​​ #RestAPIs​​ #CodingTutorial​​ #CurdOperation​​ #Coding​​ #VsCode​​ #Express​​ #Postman​​ #Windows​​ #englishTutorial​​ #ShortTutorial​​
#BeginnersGuide​​ #TutorialForBeginners​​ #restapitutorial​​ #apitutorial​​ #nodejsexpress​​ #expressSql​​
#programming​​ #programmingbackend​​ #technology​​ #nodejsProgram​​ #projectinnodejs​​ #webdevelopment​​

Copyright © 2021 Codemelon - All Rights Reserved.

Note: If you use a copyrighted work without the appropriate permission, you
may be violating --or "infringing" --the owner's right to that work. Infringing someone
else's copyright may subject you to legal action.
Рекомендации по теме
Комментарии
Автор

If my password is encrypt, how to bcrypt.compare for login, please give any hit. I am using nodeJS & pgadmin

neelpatel
Автор

It is taking much time, any solution that can faster then this

ShreeMamadevji
Автор

my password is encrypted successfully and stored in database also but my app get crashed.
can you please help me mam?

Error: Cannot enqueue Handshake after already enqueuing a Handshake.
at Protocol._validateEnqueue
at Protocol._enqueue
at Protocol.handshake
at Connection.connect
at {
code: 'PROTOCOL_ENQUEUE_HANDSHAKE_TWICE',
fatal: false
}
[nodemon] app crashed - waiting for file changes before starting...

Code:
app.post('/signup', async function(req, res){
var name=req.body.name;
var email=req.body.email;
var password=req.body.password;
const salt= await bcrypt.genSalt(20);
password= await bcrypt.hash(password, salt);

con.connect(function(error){
if(error) throw error;
con.query("SELECT COUNT(*) AS count FROM registration_data WHERE email = ?", [email], function(error, results){
if(error){
console.log(err);
}else{
if(results[0].count > 0){
res.send("This email is already in use, try with another email.");
}else{
var sql="INSERT INTO registration_data(name, email, password)VALUES('"+name+"', '"+email+"', '"+password+"')";
con.query(sql, function(error){

if(error) throw error;
res.send("Register Sucessfully");

});
}
}
});

});

rushikeshkatkar
welcome to shbcf.ru