2,340
questions
0
votes
0
answers
42
views
My mern project is not running in azure web app
i created a project with frontend react vite and backend with node js, the project is running on the local machine with same node version but not running on azure, in azure deployment center the ...
0
votes
2
answers
61
views
Changing and hashing passwords with bcrypt
In my node.js app, I have a simple userSchema that allows users to login and all other basic crud operation for authentication. In my change password, where the problem is occurring, I am getting the ...
0
votes
1
answer
70
views
How does String.crypt generate the same hash as BCrypt when given the BCrypt hash as the salt?
I found some code that uses String.crypt to hash passwords (yikes!), so I played around with a way that I could check a password against a BCrypt hash as well as the old String.crypt hashes.
What I ...
0
votes
0
answers
88
views
Wrong password while logging in - bcrypt
I am making a login route with jwt token and express. When I create an account, the password is hashed by bcrypt. When I log in, I need to compare them. I tried with simplest password but it didn't ...
0
votes
0
answers
42
views
Hashing password using bcrypt and node js
I'm working on a Node.js project that involves user authentication using JWT and bcrypt. I'm able to register a user successfully, but when I try to log in with the same password, I get a password ...
0
votes
0
answers
12
views
"TypeScript Error: Property 'comparePassword' does not exist on type 'Document<unknown, {}, IUser> & IUser' in Mongoose Model"
I'm developing a LMS in Node.js application along with TypeScript and Mongoose. I have defined a user schema and model, and I'm trying to add a custom method comparePassword to the user model for ...
0
votes
0
answers
23
views
Bcrypt compare sync returning incorrect output
I have the following express middleware:
app.use((req, res, next) => {
if (!process.env.UNIVERSAL_FS_PASSWORD) {
return res.status(401).json({
success: false,
error: &...
0
votes
0
answers
36
views
getting this error while installing bcrypt how to solve this
im trying to load this repository on my pc , it was created by me on my other pc , now when im installing it on my older pc , whenever i try to install the bcrypt module an error keeps showing up all ...
-1
votes
1
answer
45
views
bcrypt hashing password nodejs
i keep getting this error "Invalid password" even if the password and email are correct which makes no sense pls help me to solve this problem i think that i am comparing a hashed password ...
3
votes
1
answer
148
views
How to prevent null bytes from being passed to Bcrypt (password_hash)?
I have a script that creates a secure token for browser login remember-me like so:
$token = random_bytes(32);
This is then saved to a database for comparison later on:
$sql = " INSERT INTO ...
0
votes
0
answers
69
views
Perl yancy auth with Bcrypt and dynamic salt
HI played around with Yancy the cms for Perl Mojolicious web framework.
When I tried to configure the salt for the password I could pass only static values:
$self->yancy->plugin(
'...
0
votes
0
answers
184
views
Problems installing bcrypt using npm
Every time I try to install bcrypt I get a bunch of errors. Even though I've already installed node-gyp and node-pre-gyp, the errors still remain. I'm considering changing versions but I don't really ...
2
votes
1
answer
71
views
Issue with `bcryptjs` Password Comparison in Node.js and React
I'm having issues with bcryptjs while handling passwords in my application. Registering users works fine, but logging in using the same password is giving me errors. I have made sure that the password ...
1
vote
1
answer
70
views
Thunder Client, encrypted password unable to login, Server Error Occurred
I am using Thunder Client for testing backend applicatoipn, I encrypted password and jwt token token generated.
http://localhost:4000/login
When trying to login it gives me message- Status: 500 ...
0
votes
0
answers
37
views
Bcryptjs.compare always returning false in React App
I am having trouble with Bcrypjs.compare() when run on a handle submit of a login form. The form is created using formik.
As the code below displays, when submitting username and passkey, it first ...
11
votes
0
answers
6k
views
npm warns about memory leak in a transitive dependency of bcrypt
Context
After installing bcrypt, I received several warnings about deprecated packages, but the first one is especially troubling:
$ npm install bcrypt
npm WARN deprecated [email protected]: This module ...
0
votes
0
answers
70
views
Error: /opt/render/project/src/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node: invalid ELF header
my render has been showing me 'Error: /opt/render/project/src/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node: invalid ELF header' whenever i want to deploy my backend 'Node.js'
please whoever ...
1
vote
1
answer
84
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
1
answer
264
views
i have a problem in importing and using bcrypt for hashing a password in my project
I tried to use bcrypt to hash a password in my project, but every time the password is saved in the MongoDB without being hashed. I've attempted various solutions, but none have worked. In an effort ...
0
votes
1
answer
24
views
Login page can't correctly direct to secret page
I am trying to build a simple sign up page and login page. Here is my code below
const express = require("express");
const app = express();
const mongoose = require("mongoose");
...
0
votes
0
answers
38
views
Is this form of password caching safe?
if user_info is None:
return None
correct_password = user_info["pw_bcrypt"].encode()
if correct_password in state.cache.bcrypt:
if password_to_check != state.cache.bcrypt[...
2
votes
1
answer
64
views
Type Mismatch Error When Wrapping Bcrypt Hash Function in Rust with N-API
I'm working on a project where I need to wrap the bcrypt hash function using N-API in Rust. I've written the following code, but I'm encountering type mismatch errors during compilation. I'd ...
-1
votes
1
answer
104
views
Flask - Encrypt password before POST request [duplicate]
How can I encrypt my password before the POST request is made.
I am using BCrypt to encrypt my paswords. I know Bcrypt offers both a python solution and a JS version. Currently I do encrypt my ...
0
votes
1
answer
224
views
RSA between C# and C's BCrypt [duplicate]
I am trying to use RSA 2048 to have encryption between my C# and C programs. To accomplish this, I am imbedding the private key inside my C program and imbedding the public key inside the C# program. ...
1
vote
0
answers
157
views
Converting C# RSA private key into a form BCrypt can understand
I need help using BCrypt to communicate between my C# app and my C app. Specifically, I need to imbed the private key inside my C application and then imbed the public key inside my C# app since my C# ...
0
votes
0
answers
80
views
Why can't bcrypt find 'checkpw'
I'm writing a program with Python. It has a login and I want to use bcrypt but it's not working.
Instead, it shows the following error message:
AttributeError: type object 'bcrypt' has no attribute '...
-1
votes
2
answers
45
views
Using bycrpt.compare in node.js app but it isn't being called or working at all
I am using bycrypt for my login process and it doesn't seem to be working. I have already stored the previously hashed password in the database so I am retrieving it from the database and then ...
0
votes
1
answer
61
views
Bcryptjs compare not working when I pull from user.password
Here is some testing of code that works:
Assume all files are importing bcrypt from bcryptjs and DB is working.
// Validate Password testing
const salt = await bcrypt.genSalt(10);
const ...
1
vote
1
answer
187
views
Is it possible to migrate from bcrypt to crypto?
Having multiple ACL with user records and password generated with.
bcrypt.hashSync(request.password, bcrypt.genSaltSync(8))
We can compareSync these passwords without the need to generate the salt ...
0
votes
0
answers
228
views
Bcryptjs x Bun.hash
I'm working on a project in Bun based on a Moodle foundation, in PostgreSQL. The stored password hash is generated using the password_hash function (PHP) using the bcrypt algorithm.
Initially, I tried ...
0
votes
1
answer
43
views
Bcrypt.hashSync returns false when checking updated password
I want the login to be successful but even though the password is updated in database and is being displayed as changed, the compareSync on bcrypt returns false.
async login(req: Request, res: ...
0
votes
3
answers
406
views
[auth][details] { "provider: credentials"} [auth] [cause] {TypeError: "ikm'} also data is undefined in login form
These were my files and i used nextjs, prisma supabase, server actions i tried to auth bby watching this video https://www.youtube.com/watch?v=1MTyCvS05V4&t=6741s&ab_channel=CodeWithAntonio. i ...
0
votes
1
answer
164
views
Is there any way to not show the password in the payload of the request?
I'm trying to ensure that when a user enters their password to log in, it doesn't appear in the payload of the request. In the backend, I'm using express.js and encrypting passwords with bcrypt. In ...
1
vote
3
answers
2k
views
Bcrypt gives an Unexpected Token error with Next.js 14 (Client component) and Next-Auth
I have run into this issue where bcrypt does not work with Nextjs and gives this error:
Module parse failed: Unexpected token (1:0)
And in the console, I am getting this error:
./node_modules/@...
0
votes
1
answer
206
views
Aws Airflow 2.7.2 installing paramiko 3.3.1 error
I'm upgrading my airflow from 1.10.12 to 2.7.2, python 3.6 to 3.11.7 and trying to install my libraries I get an error on Paramiko
enter image description here
but I have already tried to install ...
0
votes
0
answers
125
views
Bcrypt Password Truncation issue solution or Hashing Long Passwords with Bcrypt in Java?
In scenarios where passwords exceed the 72-byte limit of Bcrypt hashing, it becomes necessary to devise alternative approaches to ensure all input data is hashed without loss. One viable solution ...
0
votes
2
answers
211
views
Can not install bcrypt in a nextjs project on windows 11 and node version 20.11.0
Here is a complete log of installing process , after running the command:
npm i bcrypt
298 error code 1
299 error path E:\Learn\NextJS\Projects\2024-1-1\admin-dashboard\node_modules\bcrypt
300 error ...
0
votes
2
answers
206
views
brcrypt is not working properly with Next.js 14.0
So, I am trying to implement Infinite scrolling for listing posts. Thhat implies that I have to use client component with the use client directive.
However, I get the error:
Module parse failed: ...
0
votes
1
answer
123
views
The npm - bcrypt package is not installed, ERR! code 7
Using the command npm install bcrypt
error:
npm ERR! code 7
npm ERR! path /home/animagnoa/git/learn-reactjs-nodejs/node_modules/bcrypt
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp ...
1
vote
0
answers
219
views
Error installing bcrypt - Error [ERR_REQUIRE_ESM]: require() of ES Module
I am trying to install bcrypt to my NextJs project but I am getting an error. I am using "yarn add bcrypt."
Error [ERR_REQUIRE_ESM]: require() of ES Module ...\Portfolio\fo
od-ordering\...
0
votes
1
answer
44
views
Why is my plain text and salt not coinciding?
I am developing an api, an I am using nodejs, express, sequelize, mysql.
I am implementing my authentication routes and methods using bcrypt and jwt. My user registration works fine, the users are ...
0
votes
1
answer
176
views
i use bcrypt to hash password but when i use postman to test api it gives me this error :>>>
i use bcrypt to hash password but when i use postman to test api it gives me this error :>>> data must be a string or Buffer and salt must either be a salt string or a number of rounds
import ...
0
votes
1
answer
1k
views
storing and retrieving hashed password in postgres
I am watching a tutorial on FastAPI, where it switched the database from SQLite to PostgreSQL, before generating a token. It was working before but now it has an error, shown below
return bcrypt....
0
votes
1
answer
124
views
Deno HTTP Server not working on Deno Deploy with Oak
Hi I'm having trouble deploying my Deno server to Deno Deploy.
I suppose it's having something to do with the Bcrypt library but I have no idea how I could fix this with maybe another library, or ...
1
vote
4
answers
301
views
Bcrypt Compare Password
I'm having problem in comparing the password and yes it is storing the hash of the password correctly when I'm registering.
Database - MongoDB
I'm using node.js version - v18.17.0
bcrypt version - 5.1....
0
votes
2
answers
102
views
Optimize verifyKey middleware for hashed API Keys
I am currently working on a project where I am developing (for now) a read-only API where a user can access information from a DB using generated API keys.
After running some tests using apache bench, ...
0
votes
0
answers
40
views
hashed password is different from database hashed password each time I run a test, even if the password is the same
Im implementing a REST API, Im trying to do a test to update the password, the problem I am having is everytime I try to do it the hash is always different even if the password is the same the hash ...
0
votes
1
answer
166
views
I'm facing an issue while trying to install the bcrypt.js package using Node.js version 14
when I try to install bcrypt version 5 or below ,it not install for Node.js version 14. It show error like this:
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (...
0
votes
0
answers
35
views
Why does bcrypt compare method always returns false?
I doing some maintenance for an old code, which was working fine, but now somehow the login method isn't working properly as it should, and this's because of the "bcrypt.compare" function ...
0
votes
0
answers
272
views
How do I properly utilize an external an external dependency like bcrypt in a Nuxt 3 app?
Currently, in my Nuxt 3 app, I have a registration form that collects a username, email, and password. Before sending the password in a POST request, I would like to hash the password. My first ...