Skip to content

Commit

Permalink
fixed https bug
Browse files Browse the repository at this point in the history
  • Loading branch information
colinskow committed Sep 11, 2015
1 parent 82b4d52 commit 153653a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/oauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ module.exports = function(router, passport, user, config) {
if(accessToken) {
accessToken = encodeURIComponent(accessToken);
}
var protocol = req.get('X-Forwarded-Protocol') || req.protocol + '://';
var protocol = (req.get('X-Forwarded-Proto') || req.protocol) + '://';
if(operation === 'login') {
return protocol + req.get('host') + req.baseUrl + '/' + provider + '/callback';
}
Expand Down

0 comments on commit 153653a

Please sign in to comment.