{"action":"created","issue":{"url":"https://api.github.com/repos/MrSwitch/hello.js/issues/307","labels_url":"https://api.github.com/repos/MrSwitch/hello.js/issues/307/labels{/name}","comments_url":"https://api.github.com/repos/MrSwitch/hello.js/issues/307/comments","events_url":"https://api.github.com/repos/MrSwitch/hello.js/issues/307/events","html_url":"https://github.com/MrSwitch/hello.js/issues/307","id":101630287,"number":307,"title":"Firefox: 'Could not decode state parameter'","user":{"login":"chrisdubya","id":7106557,"avatar_url":"https://avatars.githubusercontent.com/u/7106557?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisdubya","html_url":"https://github.com/chrisdubya","followers_url":"https://api.github.com/users/chrisdubya/followers","following_url":"https://api.github.com/users/chrisdubya/following{/other_user}","gists_url":"https://api.github.com/users/chrisdubya/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdubya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdubya/subscriptions","organizations_url":"https://api.github.com/users/chrisdubya/orgs","repos_url":"https://api.github.com/users/chrisdubya/repos","events_url":"https://api.github.com/users/chrisdubya/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdubya/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-18T10:59:44Z","updated_at":"2015-09-18T19:52:58Z","closed_at":"2015-09-18T19:52:58Z","body":"When using the oAuth Facebook API in Firefox (40.0.2), the redirect happens within the popup and it doesn't close.  The console shows 'Could not decode state parameter'.  \r\n\r\nIt's working fine in other browsers and in Firefox locally.  \r\n\r\nThe only difference being that the request has a tracking query string that gets added to the URL during the auth request.  And I think what is happening is that Firefox is having trouble extracting the location.hash.state.\r\n\r\nAny ideas?\r\n\r\nHere's the URL: \r\n\r\n```\r\nhttp://example.com/?QUERY_STRING#state={STATE_HASH}&access_token=ACCESS_TOKEN&expires_in=1234\r\n```\r\n\r\n------\r\n\r\nNot sure if it'll help, but here's my auth request:\r\n\r\n```\r\nmodule.exports = {\r\n\r\n  auth: function(){\r\n\r\n    hello.init({\r\n      facebook: ***APP ID***,\r\n    });\r\n\r\n    var countryList = require('../data/countries.js');\r\n\r\n    // Gets country data and converts it into a country code to update the form\r\n    function getCountryCode(country) {\r\n      var countryCode;\r\n      for (var i = 0; i < countryList.length; i++){\r\n\r\n        // Once a match is found..\r\n        if(countryList[i].name.match(country)){\r\n          countryCode = countryList[i]['alpha-3'];\r\n          countryField.value = countryCode;\r\n          form.submit();\r\n        }\r\n      }\r\n    }\r\n\r\n    function getUserDetails() {\r\n\r\n      // listen for authorization token\r\n      hello.on('auth.login', function(auth) {\r\n\r\n        // call user information, for the given network\r\n        hello( auth.network ).api( '/me' ).then( function(response){\r\n\r\n          // inject response values into form fields\r\n          firstNameField.value = response.first_name;\r\n          lastNameField.value = response.last_name;\r\n          emailField.value = response.email;\r\n\r\n          // inject everything after last comma in location\r\n          getCountryCode(response.location.name.replace(/(.*), ([^,]*)/, '$2'));\r\n        });\r\n\r\n      });\r\n    }\r\n\r\n    events.on(fixBtn,'click',function(){\r\n      hello( 'facebook' ).login({scope: 'email, user_location'});\r\n      getUserDetails();\r\n    });\r\n  },\r\n\r\n ...\r\n\r\n  init: function(){\r\n    this.auth();\r\n    this.validate();\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/MrSwitch/hello.js/issues/comments/141550816","html_url":"https://github.com/MrSwitch/hello.js/issues/307#issuecomment-141550816","issue_url":"https://api.github.com/repos/MrSwitch/hello.js/issues/307","id":141550816,"user":{"login":"MrSwitch","id":947163,"avatar_url":"https://avatars.githubusercontent.com/u/947163?v=3","gravatar_id":"","url":"https://api.github.com/users/MrSwitch","html_url":"https://github.com/MrSwitch","followers_url":"https://api.github.com/users/MrSwitch/followers","following_url":"https://api.github.com/users/MrSwitch/following{/other_user}","gists_url":"https://api.github.com/users/MrSwitch/gists{/gist_id}","starred_url":"https://api.github.com/users/MrSwitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrSwitch/subscriptions","organizations_url":"https://api.github.com/users/MrSwitch/orgs","repos_url":"https://api.github.com/users/MrSwitch/repos","events_url":"https://api.github.com/users/MrSwitch/events{/privacy}","received_events_url":"https://api.github.com/users/MrSwitch/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T19:52:58Z","updated_at":"2015-09-18T19:52:58Z","body":"Thanks, i think this is closed now."}}