Hi,
Did anybody already used session cookies with Loopback ?
I am trying to use a specific name both for the cookie and for the header field, but without success
Here is my preprocessing middleware code :
app.use(loopback.favicon());
app.use(loopback.logger(app.get('env') === 'development' ? 'dev' : 'default'));
app.use(loopback.compress());
app.use(loopback.cookieParser(app.get('secretcookie')));
// bodyParser commented and split to comment file upload out
// app.use(loopback.bodyParser());
app.use(loopback.json());
app.use(loopback.urlencoded());
// Comment below to disable file upload
// app.use(loopback.multipart());
app.use(loopback.methodOverride());
app.use(loopback.token({
model: app.models.accessToken,
cookies: ['my-auth'],
headers: ['X-My-Auth'],
}));
No cookies are sent, and the token in the header is still "authorization"
I also tried moving app.enableAuth() before or after this preprocessing code, with no effect
Any help appreciated
Thanks
--
Aurelien