2016-09-06 3 views
0

친구들, 저는 내 응용 프로그램에서 사용자 인증을 위해 passport-trello를 사용하고 있습니다. passportjs, tokenSecret은 빈 객체를 반환합니다.

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: 'Common Feed', 
     expiration: '1hour' 
    } 
    }, (req, token, tokenSecret, profile, done) => { 
     let user = {}; 
     user.token = token; 
     user.tokenSecret = tokenSecret; 
     user.profile = profile; 
     done(null, user); 
    })); 
} 

내가 다른 소품은 해당 정보로 가득 동안 user.tokenSecret는 빈 객체를 반환 밝혀 사용자 개체를 로그 아웃하는 것을 시도하고있다. 나는 누군가가이 쟁점을 갖고 있는지, 그리고 그렇게되는 이유가 궁금합니다. 고마워요

답변

0

나는 req 인자가 정확히 tokenSecret이라는 것을 알아 냈습니다! 이상한 행동이지만 그것이있는 그대로입니다. req 문자열을 반환합니다.이 문자열을 사용하여 Trello의 API에 액세스 할 수 있습니다. 희망은 누군가를 도울 것입니다

관련 문제