0
express를 통해 trello 계정으로 인증하기 위해 passport-trello를 사용하고 있습니다.오류 : 세션에서 요청 토큰을 찾을 수 없습니다. passport js
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/'
}));
TrelloStrategy :
이 문제를 해결하는 방법을 알고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);
}));
}
? 미리 감사드립니다.
'token' 및'profile' 인수에 값이 있습니까? –
일부 마법 문제가 해결되면 어떻게 될지 모르겠다. 하지만 이제'tokenSecret'은 빈 객체를 반환합니다. 그리고 심지어 그걸로 - trello 인증은 잘 작동했습니다. 그게 뭐야? 설명서에 따르면 – mcmxc
은 비밀 토큰이 전혀없는 것처럼 보입니다. –