Tag: pingfederate

不工作:PingFederate + Passport.js Ping

我试图用PingFederate作为我的Auth服务器和passport-ping npm进行login。 我做了所有通常的configuration,即 app.get("/auth/ping", passport.authenticate("ping")); app.get("/auth/ping/callback", passport.authenticate("ping",{ failureRedirect: '/login'}), function(req,res){ console.log(profile); res.render("profile", {user : req.user}); } ); 和 // Ping Strategy passport.use(new PingStrategy({ host: 'blahblah.com', port: 9031, clientID: config.ping.clientID, clientSecret: config.facebook.clientSecret, callbackURL: config.ping.callbackURL }, function(accessToken, refreshToken, profile, done) { User.findOrCreatePingUser(profile, done); })); 我甚至可以授予PingFederate的许可,并从那里重新定向。 但是,当Passport试图parsing这个授权码时,会抛出以下错误: Express 500 TokenError: Invalid client or client credentials at Strategy.OAuth2Strategy.parseErrorResponse (c:\Sandbox\node_modules\passport-ping\node_modules\passport-oauth\node_modules\passport-oauth2\lib\strategy.js:298:12) […]