Error: Failed to find request token in session, passport js
Error: Failed to find request token in session, passport js
我正在使用 passport-trello 通过 express 对 trello 帐户进行身份验证。
Error: Failed to find request token in session
当我已经被重定向到 trello 提示符并且在我点击“允许”按钮后立即出现此错误。
路由:
app.get('/auth/trello', passport.authenticate('trello'));
app.get('/auth/trello/callback', passport.authenticate('trello', {
successRedirect: '/',
failureRedirect: '/error/'
}));
Trello 策略:
export default () => {
passport.use(new TrelloStrategy({
consumerKey: process.env.TRELLO_CONSUMER_KEY,
consumerSecret: process.env.TRELLO_CONSUMER_SECRET,
callbackURL: 'http://localhost:3000/auth/trello/callback',
trelloParams: {
scope: 'read',
name: 'CommonFeed',
expiration: 'never'
}
}, (req, token, tokenSecret, profile, done) => {
let user = {};
user.token = token;
user.profile = profile;
done(null, user);
}));
}
谁知道如何解决这个问题?提前谢谢
事实证明,req
恰好是 tokenSecret
。刚刚在我的应用程序中检查了这个。奇怪的行为,但它就是这样。也许 trello 改变了一些东西,passport-trello
变得过时了,不知道。无论如何,非常感谢康斯坦丁的帮助。
我正在使用 passport-trello 通过 express 对 trello 帐户进行身份验证。
Error: Failed to find request token in session
当我已经被重定向到 trello 提示符并且在我点击“允许”按钮后立即出现此错误。
路由:
app.get('/auth/trello', passport.authenticate('trello'));
app.get('/auth/trello/callback', passport.authenticate('trello', {
successRedirect: '/',
failureRedirect: '/error/'
}));
Trello 策略:
export default () => {
passport.use(new TrelloStrategy({
consumerKey: process.env.TRELLO_CONSUMER_KEY,
consumerSecret: process.env.TRELLO_CONSUMER_SECRET,
callbackURL: 'http://localhost:3000/auth/trello/callback',
trelloParams: {
scope: 'read',
name: 'CommonFeed',
expiration: 'never'
}
}, (req, token, tokenSecret, profile, done) => {
let user = {};
user.token = token;
user.profile = profile;
done(null, user);
}));
}
谁知道如何解决这个问题?提前谢谢
事实证明,req
恰好是 tokenSecret
。刚刚在我的应用程序中检查了这个。奇怪的行为,但它就是这样。也许 trello 改变了一些东西,passport-trello
变得过时了,不知道。无论如何,非常感谢康斯坦丁的帮助。