13+ Error: Data And Salt Arguments Required. Cpwd is null, and that's the reason for the error. Body.confirmpassword = bcrypt.hashsync(cpwd, 10);//**cpwd is null** as per the docs, data is required argument and.
The error says data and salt arguments required. Remove the arrow =>in bcrypt.hash(). It looks like your salt is correctly generated and you didn’t check if newuser.password === undefined, so here’s my.
Contents
- 1 Express/Node Js Application Using Postgresql.
- 2 Body.confirmpassword = Bcrypt.hashsync(Cpwd, 10);//**Cpwd Is Null** As Per The Docs, Data Is Required Argument And.
- 3 It Looks Like Your Salt Is Correctly Generated And You Didn't Check If Newuser.password === Undefined, So Here's My Bet:
- 4 The Error Says Data And Salt Arguments Required.
- 5 4 Var Router = Express.router();
Express/Node Js Application Using Postgresql.
Cpwd is null, and that's the reason for the error. Solution 1 the error comes from the bcrypt.hash method. In your case, you have the following piece of code :
Body.confirmpassword = Bcrypt.hashsync(Cpwd, 10);//**Cpwd Is Null** As Per The Docs, Data Is Required Argument And.
In your case, you have the following piece of code : Const mongoose = require ('mongoose'); Bcrypt.hash (newuser.password, salt , (err,.
It Looks Like Your Salt Is Correctly Generated And You Didn't Check If Newuser.password === Undefined, So Here's My Bet:
It looks like your salt is correctly generated and you didn’t check if newuser.password === undefined, so here’s my. Remove the arrow =>in bcrypt.hash(). Const bcrypt = require ('bcrypt');
The Error Says Data And Salt Arguments Required.
6 //password hashing 7 var bcrypt = require('bcrypt'); 5 var user = require('./app/models/user'); I am receiving an error data and salt arguments required.
4 Var Router = Express.router();
1 'use strict' 2 3 var express = require('express'); It looks like your salt is correctly generated and you didn’t check if newuser.password === undefined, so here’s my bet: The error comes from the bcrypt.hash method.