V
V
Vlad Timofeev2015-01-08 13:14:32
GitHub
Vlad Timofeev, 2015-01-08 13:14:32

Why is Github not giving away the token?

During the creation of authorization on passport.js , I cannot determine where to get the token from when authorizing through github.

passport.use(new GitHubStrategy({
    	clientID        : configAuth.githubAuth.clientID,
        clientSecret    : configAuth.githubAuth.clientSecret,
        callbackURL     : configAuth.githubAuth.callbackURL
  	},
    function(req, token, refreshToken, profile, done) {
       console.log(token); 
// -> undefined
       console.log(refreshToken);
// -> 
// { access_token: '42d3873ac7f7212213f18abe9dd5fd4bac3b2cb8',
//  scope: '',
//  token_type: 'bearer' }

}

It seems that it is not necessary to use refreshToken.access_token , because the same Facebook gives a normal token.
How can I get a token? :(
Thank you for your help..

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad Timofeev, 2015-01-08
@PyTiMa

I decided.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question