This is giving me a huge headache, the CSRF cookie is working correctly but I've seemed to have broken something and cannot get the sessions to start. Any help would be appreciated.
EDIT: I forgot to mention, I am using Nginx as a reverse proxy server which is forwarding to my Node server which is accepting all requests from Nginx with HTTPS, as I heard you need to in order to have secure sessions.
var express = require('express'),
path = require('path'),
cookieParser = require('cookie-parser'),
session = require('cookie-session'),
csrf = require('csurf'),
bodyParser = require('body-parser');
var app = express();
app.enable('trust proxy', 1);
app.use(session({
secret: 'supersecret!',
name: 'session_id'
}));
app.use(cookieParser('supersecret!'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));