Closed dstroot closed 10 years ago
Once I enabled the cookieParser all of these approaches worked:
console.log('Token: ' + req.accessToken.id);
console.log('Good Tok: ' + req.signedCookies.access_token);
// Find a token for the given ServerRequest.
var AccessToken = app.models.AccessToken;
AccessToken.findForRequest(req, {}, function (err, token) {
if (err) {
req.flash('error', { msg: 'Sorry, something went wrong! ' + err.message });
return res.redirect('back');
}
console.log('Token2: ' + token.id);
});
Having a hell of a time figuring out how to get the accessToken so after my user is authenticated I can hit the api and do stuff. Tried: