Remember me tokens now nuked upon full account logout.
This commit is contained in:
parent
3fb71ffb78
commit
bc0657a702
5 changed files with 26 additions and 16 deletions
|
|
@ -34,7 +34,7 @@ module.exports.post = async function(req, res){
|
|||
const data = matchedData(req);
|
||||
|
||||
//If the user has a remember me token id they've submitted with the request
|
||||
if(data.rememberme.id){
|
||||
if(data.rememberme != null && data.rememberme.id != null){
|
||||
//Find the associated token and nuke it
|
||||
await rememberMeModel.deleteOne({id: data.rememberme.id})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue