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
30
66
15
+ 14 other calls in file
GitHub: varakdom/AREA
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.
0
0
1
+ 25 other calls in file
passport-oauth2.call is the most popular function in passport-oauth2 (77 examples)