ARTICLE AD BOX
Code for argon2:
const usercheck = userModel.findOne({ username: req.body.username }) const pwcheck = userModel.findOne({ password: mongoose.Query }) if(!usercheck) return res.status(400).json({success: false, message: "Username not found."}) try { if (await argon2.verify(pwcheck, req.body.password)) { res.status(200).json({ success: true, message:"Logged in!" }) } else { res.status(400).json({ success: false, message: 'invaild password' }) } } catch (err) { console.log(err) }How do I get the string from the mongoose database? and then so I can give it to argon2 to verify it
