我已经成功地在 FeathersJS 应用程序中使用 OAuth2 对 Facebook、Github 等进行身份验证......现在,我正在尝试使用它对使用WordPress OAuth Server的 Wordpress 服务器进行身份验证。我已经对其进行了配置并将所有配置参数设置为我认为正确的值:
...
const OAuth2Strategy = require('passport-oauth2').Strategy;
...
app.configure(oauth2({
name: 'wordpress',
Strategy: OAuth2Strategy,
authorizationURL: 'https://192.168.1.86/wp-content/plugins/miniorange-oauth-20-server/web/index.php/moserver/authorize',
tokenURL: 'https://192.168.1.86/wp-content/plugins/miniorange-oauth-20-server/web/index.php/moserver/token',
successRedirect: '/',
failureRedirect: '/',
clientID: 'CLIENT_ID',
clientSecret: 'CLIENT_SECRET'
}));
但 FeathersJS 服务器总是无法通过身份验证。问题是我看不到任何关于它为什么失败的信息,设置环境变量 DEBUG="feathers-authentication*" 后我得到的唯一信息是:
feathers-authentication:express:expose-headers Exposing Express headers to hooks and services +36s
feathers-authentication:express:expose-cookies Exposing Express cookies to hooks and services undefined +36s
feathers-authentication:express:expose-headers Exposing Express headers to hooks and services +127ms
feathers-authentication:express:expose-cookies Exposing Express cookies to hooks and services undefined +127ms
feathers-authentication:middleware:failure-redirect Clearing old 'feathers-jwt' cookie +37s
feathers-authentication:middleware:failure-redirect Redirecting to / after failed authentication. +0ms
有谁知道如何获取有关为什么 OAuth2 身份验证失败的更多信息,以便我可以检查哪个配置错误?
谢谢!