Register, Login, and Logout

This commit is contained in:
2026-05-13 19:27:59 -04:00
parent f591bdffb5
commit 86f94b7bf3
23 changed files with 737 additions and 25 deletions
+22
View File
@@ -0,0 +1,22 @@
const argon2 = require('argon2');
async function HashPassword(password) {
try {
return await argon2.hash(password);
} catch(err) {
throw err;
}
}
async function TestPassword(password, hash) {
try {
return await argon2.verify(hash, password);
} catch(err) {
throw err;
}
}
module.exports = {
HashPassword,
TestPassword
}