我看到此错误消息"无法GET /注销"对于/ logout URL,但是从文档看来,链接应该自动注册为路由。我的代码目前非常基础,看起来像:
var express = require("express");
var stormpath = require('express-stormpath');
var app = express();
var port = 1337;
app.use(stormpath.init(app, {
apiKey: {
id: '<>',
secret: '<>'
},
application: {
href: "<>"
},
website: true
}));
app.get("/", stormpath.loginRequired, function(req, res) {
res.send("Hello Node.js and Express.");
});
app.on('stormpath.ready', function() {
console.log('Stormpath Ready!');
});
console.log("Web application opened.");
app.listen(port);
非常感谢任何帮助。
答案 0 :(得分:3)
express-stormpath的注销路由需要POST请求。我们这样做是为了防止omnibar意外地从应用程序中退出。