Lets-code-with-us / scamwebsiteV1

Scam Alert is an open-source platform where users can share and alert others about new types of scams. The goal is to create a community-driven space to identify and report various scam attempts, helping to protect people from fraud.
https://scamwebsite-v1.vercel.app/
12 stars 45 forks source link

Resolve the bcrypt and signup issue #63

Closed AadarshDubey closed 1 month ago

AadarshDubey commented 1 month ago

ISSUE NAME

bycrypt and signin issue

ISSUE DESCRIPTION

Issue related to bcrypt hashing and user sign-in functionality in a route.ts file in src/app/api/user/forgetpassword. route.ts file was having few issues related to async/await usage, error handling, and some logic in password hashing and token verification. Following things can be done to resolve the issue:- By async handling, JWT handling and by introducing a check to ensure the new password is different from the old one, and fixing the password match comparison.