How to use the prototype function from passport-oauth2

Find comprehensive JavaScript passport-oauth2.prototype code examples handpicked from public code repositorys.

125
126
127
128
129
130
131
132
133
134
135
  // Workaround instead of reimplementing authenticate function
  req.query = {...req.query, ...req.body};
  if (req.body && req.body.user) {
    req.appleProfile = JSON.parse(req.body.user);
  }
  OAuth2Strategy.prototype.authenticate.call(this, req, options);
};


/**
 * Modify the authorization params. Currently adds
fork icon30
star icon66
watch icon15

+ 14 other calls in file

194
195
196
197
198
199
200
201
202
203
204
Strategy.prototype.parseErrorResponse = function(body, status) {
  var json = JSON.parse(body);
  if (json.error && typeof json.error == 'object') {
    return new FacebookTokenError(json.error.message, json.error.type, json.error.code, json.error.error_subcode, json.error.fbtrace_id);
  }
  return OAuth2Strategy.prototype.parseErrorResponse.call(this, body, status);
};


/**
 * Convert Facebook profile to a normalized profile.
fork icon0
star icon0
watch icon1

+ 25 other calls in file