30 questions
0
votes
0
answers
22
views
NPM Error: EPERM: Operation Not Permitted (mkdir)
I'm encountering an issue while trying to install npm packages using:
npm i express cors dotenv nodemon jsonwebtoken mongoose bcryptjs nodemailer cookie-parser
However, I get the following error:
npm ...
1
vote
2
answers
352
views
Neither WebCryptoAPI nor a crypto module is available in bcryptjs v3.0.0
I recently upgraded bcryptjs to version ^3.0.0 in my Node.js project and encountered the following error while trying to hash a password:
const bcrypt = require("bcryptjs");
const password =...
1
vote
1
answer
98
views
bcrypt.compare always returns false when comparing passwords
For some reason bcrypt.compare stopped working and doMatch always returns false. I'm able to create new users with hashed password but then cannot log in for the aforementioned reason. My login ...
0
votes
0
answers
37
views
Javascript password never match in the login system using bcryptjs
I'm trying to create a login system in javascript, but the password my user use in the login system never match the one saved in the storage.
This is my controller file:
exports.getUserSignUpPage = (...
-2
votes
1
answer
45
views
can not login using express and mongodb
hello everyone getting this problem can not login getting server error which is in catch part checked credential and evryhting is okay getting the data in req.body but getting nothing when console log ...
0
votes
1
answer
353
views
bcrypt.compare gives a TypeError
I'm working on a project using Next.js v14.0.0.
I'm using MongoDB Atlas. I'm working on a login form. I'm trying to perform a login operation.
I've been experiencing a problem, when using bcryptjs (&...
0
votes
1
answer
260
views
Error when deploy NodeJS app to App Engine. Cannot read property "something" of undefined
Today, I get an error when deploy NodeJS app to App Engine (GCP) : can not read property 'bcryptjs' of undefined. NodeJS version is 18.6.0 in my computer and version in app.yaml is nodejs14.
I get ...
0
votes
1
answer
1k
views
Why am I receiving "Error: Requiring unknown module "undefined"." when using bcryptjs in react-native app
I have imported bcryptjs for password hashing in the client (rather than server) in my react-native app. All of my code appears to be correct, but I keep getting the following error..."Error: ...
0
votes
1
answer
483
views
NodeJS: Bcrypt: Error: Illegal arguments: undefined, string
This is part of my code from the controller I am using to do validations for the login app, so everything is being inserted correctly into the database and its encrypted right, but the moment I try to ...
2
votes
1
answer
53
views
Why is my Node.js app not correctly validating passwords at login (using passport-local and bcryptjs)?
I'm building a Node.js application and having trouble with login validation. I'm using the passport-local strategy with bcryptjs but whilst it's correctly identifying when the username does not exist ...
0
votes
1
answer
1k
views
Using bcrypt on client side web page using JavaScript
For crypto-js, it was easy to use it like:
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.js"></script>
Is there any similar option for bcrypt, ...
-2
votes
2
answers
326
views
Why am I getting 'user.matchPassword is not a function' error when calling my API with bcryptjs in Node.js and Express?
const userAuth = asyncHandler( async (req,res)=>{
const { email , password } = req.body;
const user = User.findOne({email});
if(user && (await user.matchPassword(password))){
...
0
votes
0
answers
226
views
angular v15 pollyfills bcryptjs
i wanted to use bcryptjs on angualr15. it didnt work. it throws error referring to polyfills.
I made a reproducation example:
when going for ng reproduction project --skip-git
then in the cli go for: ...
4
votes
1
answer
1k
views
Cannot find module 'bcryptjs'
I installed @types/bcryptjs package in nodejs. When I import it only, there is no problem but when I use it in my code, like that:
console.log(bcrypt.hashSync(req.body.password))
it gives me an error; ...
0
votes
3
answers
516
views
bcryptjs doesn't encrypt password before storing in mongodb and save a plain text
I am using bcryptjs to hash passwords before storing inside mongodb but it store passwords as plaintext(no hashing).this is my userModel.js
const mongoose = require("mongoose");
const bcrypt = ...
0
votes
2
answers
420
views
Node.js, mongodb, bcrypt.js login system not checking user's passwords correctly
I'm trying to create a basic login system using Node.js, mongodb and bcrypt.js. The registration is working as expected, however the user login is not, since it only works correctly for the first user ...
0
votes
1
answer
374
views
encrypt/decrypt password using bcryptjs in node
I am trying to encrypt my password field i a registration form I created using bcryptjs but it isn't working
In mongodb, on post the data from the form, the password field shows the password entered ...
0
votes
1
answer
278
views
How do I go about making the change password route in my restAPI?
I am currently doing this to register users:
const register = async (req, res) => {
const seller = await Seller.create({ ...req.body });
res.status(StatusCodes.CREATED).json({ seller });
};
I ...
0
votes
1
answer
80
views
Brcyptjs (javascript package) does not work for long values
I am using bcryptjs to hash passwords and some other data (All strings), the problem is, when the value of my hashed variable goes over a certain length, bcryptjs compares only the first 71 characters....
0
votes
3
answers
2k
views
Bcrypyt and ReactJS issue
I am trying a POC in react , , I have used react + mysql , and for DB operation I am using sequelize.
My login ,registration etc. working fine , till now I am storing password as plain text in DB.
Now ...
-2
votes
1
answer
103
views
What is the meaning of bacon and not_bacon in the README of bcrypt.js?
It's Part of the Code-Examples in the README-File.
"B4c0/\/" stands for 'password_example' I found out from another question here.
What means 'bacon' and 'not_bacon'?
To check a password:...
1
vote
1
answer
3k
views
why hashedPassword = await bcrypt.hash(this.password, salt) is not working?
I'm basically trying to just hash a password using bcrypt using async/await but nothing is working... next() is not working and it is not saving the data into the database and even not hashing the ...
0
votes
1
answer
282
views
How can I add bcryptjs to this code to encrypt passwords?
Sorry but enter code hereI can't make mongo database shows me the passwords encrypted and when I changed directly from the body the login doesn't work. How can I modify this code to encrypt passwords ...
0
votes
0
answers
144
views
How can I fix (node:14000) UnhandledPromiseRejectionWarning: Error: Expected "payload" to be a plain object. ...at validate?
I am relatively new to Promises, jwt, and bcryptjs, and I am developing an API with a custom user authentication which is supposed to check if a user with a unique email exists, if not responds within ...
0
votes
2
answers
1k
views
bcrypt fails even when passwords match...>
Having problem with comparing passwords using bcryptjs.
Env:
Node: v16.8.0
bcryptjs: 2.4.3
https: 1.0.0 - (the site / pages are all https in case that makes any difference).
This is what the code ...
0
votes
1
answer
364
views
Bcryptjs always return false
Hi, I am trying to use the bcriptjs library to compare the encrypted password with the database password.
I am using the "compare" method.
The values that I add to the method are:
First, ...
2
votes
1
answer
826
views
Multiple JWT's match hashed JWT
I'm using bcryptjs to hash a user's refresh_token before storing it in my database.
It seems that the following always evaluates to true when comparing a hashed string with a JWT, I've also gotten the ...
0
votes
1
answer
61
views
Authentication of user
I am trying to check my password in while logging in in I also have hashed my password. so I am comparing it using brcrypt. But it is giving me error enter image description here my user schema is ...
0
votes
1
answer
126
views
bcryptjs does not work on insertMany (works fine on create)
bcryptjs version: "bcryptjs": "^2.4.3"
mongoose version: "mongoose": "^6.0.12"
I am trying to encrypt user password on user creation or password update. When I ...
0
votes
0
answers
119
views
bcryptjs is not working inside a mongoose schema method
bcryptjs version: "bcryptjs": "^2.4.3"
mongoose version: "mongoose": "^6.0.12"
I am trying to encrypt user password on user creation or password update. Data is ...