Skip to content

Commit

Permalink
Add support for refreshing an access token
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebaker committed Mar 14, 2012
1 parent d300b4e commit e1a8422
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/oauth2.js
Expand Up @@ -109,7 +109,8 @@ exports.OAuth2.prototype.getOAuthAccessToken= function(code, params, callback) {
params['client_id'] = this._clientId;
params['client_secret'] = this._clientSecret;
params['type']= 'web_server';
params['code']= code;
var codeParam = (params.grant_type === 'refresh_token') ? 'refresh_token' : 'code';
params[codeParam]= code;

var post_data= querystring.stringify( params );
var post_headers= {
Expand Down

0 comments on commit e1a8422

Please sign in to comment.