I have configured Passport.js to use multiple strategies:
Passport.authenticate (['carrier', 'Facebook-token', 'google-token', 'linkedin-token'], function (error, user, info) ...
I'm sure this authentication function calls only once, but in the passport source code in the certified .z file, I see that some strategy is executing more than once.
The carrier fails , Then I want to try Focus-token
My FacebookTokenStrategy code is as follows:
facebookTokenStrategy: New FacebookTokenStrategy ({clientID: process.env.FACEBOOK_APP_ID , Client sign: process.env.FACEBOOK_APP_SECRET}, function (access_token (Refresh_token, profile, done) {someFunction (). Then (function (user) {returned (tap, user)}, done)}),
I have consulted many of these logs and console logs that the Facebook-Token strategy works with the proper access token, but the strategy is "successful" More than AM, and my API call node.JS ends in saying "GET / APIs can not be authenticated"
My bad borer was done twice in the strategy.
No comments:
Post a Comment