lundi 6 avril 2015

Not getting refresh token from Github oauth

I am using Passport for oauth and getting access token successfully, but I'm unable to get the refresh token even after setting the access_type to offline. The access_type parameter is not appended to the url on Github Login page. Code is given below:



passport.use(new GitHubStrategy({
clientID: 'client_id',
clientSecret: 'client_Secret',
scope: 'repo,user',
access_type: 'offline',
approval_prompt: 'force',
callbackURL: "http://localhost:3000/auth/github/callback"
},
function(accessToken, refreshToken, profile, done) {
token = accessToken;
console.log("accessToken: "+accessToken+" refreshToken: " +refreshToken+" profile "+JSON.stringify(profile));
......................
......................
......................

Aucun commentaire:

Enregistrer un commentaire