我尝试将OIDC提供者集成到Node,我有一个示例代码。所以,我运行这个示例代码--它抛出了一个错误(不被识别的路由或不允许的方法(GET on /api/v1/.well-known/openid-configuration)).The problem is Issuer(https://localhost:3000) -这个发布器运行得很好)。但是我将改变这个发布者((https://localhost:3000/api/v1/))--它无法解决这个问题,当我在节点js中实现oldc-provider时,我也面临着另一个问题。他们的路线覆盖了如何解决这个问题。
Sample.js
const { Provider } = require('oidc-provider');
const configuration = {
// ... see available options /docs
clients: [{
client_id: 'foo',
client_secret: 'bar',
redirect_uris: ['http://localhost:3000/api/v1/'],
true_provider: "pcc"
// + other client properties
}],
};
const oidc = new Provider('http://localhost:3000/api/v1/', configuration);
// express/nodejs style application callback (req, res, next) for use with express apps, see /examples/express.js
oidc.callback()
// or just expose a server standalone, see /examples/standalone.js
const server = oidc.listen(3000, () => {
console.log('oidc-provider listening on port 3000, check http://localhost:3000/api/v1/.well-known/openid-configuration');
});误差

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