I followed the steps found at the https://loopback.io/doc/en/lb2/Logging-in-users.html tutorial.
I am able to log-in correctly and I am given a unique Access Token, however logout throws a "401 Unauthorized". The headers contain the access token that I was given.
How can I logout?
Thanks everyone. The issue was 'body-parser' configuration issue. The server.js should look like:
var bodyParser = require('body-parser');
var app = module.exports = loopback();
app.use(bodyParser.urlencoded({extended: true})); //Configure body parser
app.use(loopback.token()); //Use access tokens
If you extend from the user-management example it will be already configured. Blank applications do not include this configuration.