neutral-old/routes/signout.js
Raphix 4243d6e651
All checks were successful
Neutral/pipeline/head This commit looks good
Implement MultiToken
2023-04-01 16:48:13 +02:00

32 lines
559 B
JavaScript

var express = require('express');
var router = express.Router();
var path = require("path")
var fs = require("fs")
var CryptoJS = require("crypto-js");
var uuid = require("uuid")
var ntr = require("../neutral-functions.js")
/* GET home page. */
router.get('/', function(req, res, next) {
var check = ntr.checkToken(req, res)
if(check.name == false) {
res.redirect(302, "/login")
} else {
ntr.clearCookies(req.cookies.tokenID)
res.clearCookie('tokenID')
res.redirect(302, "/login")
}
});
module.exports = router;