Hello - I am needing to use bcrypt.compare function from the bcrypt library. I have the cdn minified version of the bcrypt library added into the app. However, no matter what I try, it will not allow me to use the compare function from the bcrypt library.
Here is the library that I loaded the app->settings->library area:
https://cdnjs.cloudflare.com/ajax/libs/bcryptjs/2.2.0/bcrypt.js
And here is some code I am trying to run:
const bcrypt = import("bcrypt");
const passFromDB = getUser.data.password[0];
const userPass = txtPass.value;
const passwordMatched = await bcrypt.compare(userPass, passFromDB);
console.log("testing password matching: " + passwordMatched);
if(passwordMatched) {
// do something here
}
we have a legacy DB that we are having to pull from to verify a user on a different system (they still have to verify as being a retool user).
How do I go about using this library in my codebase? Thanks!