我尝试将 OIDC 提供程序集成到节点 JS,并且我有一个示例代码。所以,我运行这个示例代码,它抛出了一个错误(无法识别的路由或不允许的方法(GET on /api/v1/.well-known/openid-configuration))。问题是 Issuer(https://localhost:3000)这个发行人工作正常。但我会更改这个 Issuer((https://localhost:3000/api/v1/)) 它不起作用如何解决这个问题,当我在节点 js 中实现 oldc-provider 时我也面临另一个问题。他们的路线被覆盖如何解决这个问题
示例.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');
});
错误