Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot set property 'accessToken' of undefined #6

Open
strongant opened this issue Jul 12, 2016 · 0 comments
Open

TypeError: Cannot set property 'accessToken' of undefined #6

strongant opened this issue Jul 12, 2016 · 0 comments

Comments

@strongant
Copy link

passport.use(new QQStrategy({
clientID: config.qq.clientID,
clientSecret: config.qq.clientSecret,
callbackURL: config.qq.callbackURL,
passReqToCallback: true
},
function(accessToken, refreshToken, profile, done) {
console.log('refreshToken:');
console.log(refreshToken);
console.log('accessToken:');
console.log(accessToken);
console.log('profile:');
console.log(profile);
var providerData = profile._json;
providerData.accessToken = accessToken;
providerData.refreshToken = refreshToken;
var providerUserProfile = {
firstName: profile.name.givenName,
lastName: profile.name.familyName,
fullName: profile.displayName,
email: profile.emails[0].value,
username: profile.username,
provider: 'qq',
profiderId: profile.id,
providerData: providerData
};
users.saveOAuthUserProfile(req, providerUserProfile, done);
}
));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant