{"action":"created","issue":{"url":"https://api.github.com/repos/hapijs/bell/issues/136","labels_url":"https://api.github.com/repos/hapijs/bell/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/hapijs/bell/issues/136/comments","events_url":"https://api.github.com/repos/hapijs/bell/issues/136/events","html_url":"https://github.com/hapijs/bell/issues/136","id":105535854,"number":136,"title":"OAuth provider is detecting 'socket' instead of 'http' as protocol","user":{"login":"bherila","id":1422004,"avatar_url":"https://avatars.githubusercontent.com/u/1422004?v=3","gravatar_id":"","url":"https://api.github.com/users/bherila","html_url":"https://github.com/bherila","followers_url":"https://api.github.com/users/bherila/followers","following_url":"https://api.github.com/users/bherila/following{/other_user}","gists_url":"https://api.github.com/users/bherila/gists{/gist_id}","starred_url":"https://api.github.com/users/bherila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bherila/subscriptions","organizations_url":"https://api.github.com/users/bherila/orgs","repos_url":"https://api.github.com/users/bherila/repos","events_url":"https://api.github.com/users/bherila/events{/privacy}","received_events_url":"https://api.github.com/users/bherila/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hapijs/bell/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/hapijs/bell/labels/question","name":"question","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/hapijs/bell/milestones/25","html_url":"https://github.com/hapijs/bell/milestones/5.1.1","labels_url":"https://api.github.com/repos/hapijs/bell/milestones/25/labels","id":1267605,"number":25,"title":"5.1.1","description":null,"creator":{"login":"ldesplat","id":5972411,"avatar_url":"https://avatars.githubusercontent.com/u/5972411?v=3","gravatar_id":"","url":"https://api.github.com/users/ldesplat","html_url":"https://github.com/ldesplat","followers_url":"https://api.github.com/users/ldesplat/followers","following_url":"https://api.github.com/users/ldesplat/following{/other_user}","gists_url":"https://api.github.com/users/ldesplat/gists{/gist_id}","starred_url":"https://api.github.com/users/ldesplat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldesplat/subscriptions","organizations_url":"https://api.github.com/users/ldesplat/orgs","repos_url":"https://api.github.com/users/ldesplat/repos","events_url":"https://api.github.com/users/ldesplat/events{/privacy}","received_events_url":"https://api.github.com/users/ldesplat/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":0,"state":"open","created_at":"2015-08-22T20:07:58Z","updated_at":"2015-09-09T21:41:35Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-09-09T07:29:47Z","updated_at":"2015-09-09T21:48:07Z","closed_at":null,"body":"Consider the following OAuth URL generated by Bell: \r\n\r\nhttps://www.facebook.com/v2.3/dialog/oauth?client_id=859994797418065&response_type=code&redirect_uri=socket%3A%2F%2Fwebtier.undergroundcellar.com%2Fsignin%2Ffacebook&state=y2uYfM8i97sgrzcAQnn7w6&scope=email\r\n\r\nLooking closer, at `redirect_uri` query param, we see the protocol is \"socket\"\r\n\r\nThis is coming from here: https://www.facebook.com/v2.3/dialog/oauth?client_id=859994797418065&response_type=code&redirect_uri=socket%3A%2F%2Fwebtier.undergroundcellar.com%2Fsignin%2Ffacebook&state=y2uYfM8i97sgrzcAQnn7w6&scope=email, namely `protocol = request.connection.info.protocol;` \r\n\r\nDoes anyone know why this is returning \"socket\" instead of \"http\" (here https is not being used). I was thinking of adding this after L153 but it feels like the wrong approach: \r\n\r\n```js\r\n            if (protocol === 'socket') {\r\n                protocol = 'http';\r\n            }\r\n```\r\n\r\nAny advice?\r\n\r\nThanks,\r\nBen\r\nfyi @d-alejo"},"comment":{"url":"https://api.github.com/repos/hapijs/bell/issues/comments/139055611","html_url":"https://github.com/hapijs/bell/issues/136#issuecomment-139055611","issue_url":"https://api.github.com/repos/hapijs/bell/issues/136","id":139055611,"user":{"login":"ldesplat","id":5972411,"avatar_url":"https://avatars.githubusercontent.com/u/5972411?v=3","gravatar_id":"","url":"https://api.github.com/users/ldesplat","html_url":"https://github.com/ldesplat","followers_url":"https://api.github.com/users/ldesplat/followers","following_url":"https://api.github.com/users/ldesplat/following{/other_user}","gists_url":"https://api.github.com/users/ldesplat/gists{/gist_id}","starred_url":"https://api.github.com/users/ldesplat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldesplat/subscriptions","organizations_url":"https://api.github.com/users/ldesplat/orgs","repos_url":"https://api.github.com/users/ldesplat/repos","events_url":"https://api.github.com/users/ldesplat/events{/privacy}","received_events_url":"https://api.github.com/users/ldesplat/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T21:48:07Z","updated_at":"2015-09-09T21:48:07Z","body":"You are welcome to send a PR.\r\n\r\nProbably have to change [L159](https://github.com/hapijs/bell/blob/master/lib/oauth.js#L159) , [L192](https://github.com/hapijs/bell/blob/master/lib/oauth.js#L192) , and [L26](https://github.com/hapijs/bell/blob/master/lib/oauth.js#L26)\r\nLooks like also some code for oauth v1 needs to change."}}