2016-09-05 2 views
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); 
    })); 
} 

? 미리 감사드립니다.

+0

'token' 및'profile' 인수에 값이 있습니까? –

+0

일부 마법 문제가 해결되면 어떻게 될지 모르겠다. 하지만 이제'tokenSecret'은 빈 객체를 반환합니다. 그리고 심지어 그걸로 - trello 인증은 잘 작동했습니다. 그게 뭐야? 설명서에 따르면 – mcmxc

+0

은 비밀 토큰이 전혀없는 것처럼 보입니다. –

답변

0

reqtokenSecret입니다. 그냥 내 응용 프로그램 내에서 이것을 확인하십시오. 이상한 행동이지만, 그것이 바로 그 것이다. 어쩌면 trello가 뭔가를 바꿨고, passport-trello은 시대에 뒤떨어졌습니다. 어쨌든, 당신을 도와 주려는 콘스탄틴에게 큰 감사를드립니다.

관련 문제