我正在运行一台express服务器,并且在我的端点上设置了JWT保护。我在测试我的/graphql端点时,收到了一个403 Not allowed to provide a JWT token错误。我的其他端点工作得很好,所以我不认为这是JWT签名或验证的问题。有什么想法吗?
var jwt = require('express-jwt');
var app = express();
var jwtCheck = jwt({
secret: new Buffer(config.secret, 'base64'),
audience: aud,
issuer: iss
});
// enforce on all endpoints
app.use(jwtCheck);
app.use('/', postgraphql(config.db_string, config.db_schema, {
development: true,
log: true,
secret: config.secret,
graphiql: true,
}));

https://stackoverflow.com/questions/41371898
复制相似问题