'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _cookies = require('cookies');

var _cookies2 = _interopRequireDefault(_cookies);

var _cli = require('../../../../cli');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var route = function route(req, res) {
  var cookies = new _cookies2.default(req, res, {
    secure: _cli.config.cookie.secure
  });
  cookies.set('x-access-token', null);

  req.logout();
  res.redirect('/abe/users/login');
};

exports.default = route;