{"action":"opened","issue":{"url":"https://api.github.com/repos/fiatjaf/trello-browser/issues/1","labels_url":"https://api.github.com/repos/fiatjaf/trello-browser/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/fiatjaf/trello-browser/issues/1/comments","events_url":"https://api.github.com/repos/fiatjaf/trello-browser/issues/1/events","html_url":"https://github.com/fiatjaf/trello-browser/issues/1","id":130679985,"number":1,"title":"React dev tools interfere with the Trello authentication window","user":{"login":"odzb","id":13849896,"avatar_url":"https://avatars.githubusercontent.com/u/13849896?v=3","gravatar_id":"","url":"https://api.github.com/users/odzb","html_url":"https://github.com/odzb","followers_url":"https://api.github.com/users/odzb/followers","following_url":"https://api.github.com/users/odzb/following{/other_user}","gists_url":"https://api.github.com/users/odzb/gists{/gist_id}","starred_url":"https://api.github.com/users/odzb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odzb/subscriptions","organizations_url":"https://api.github.com/users/odzb/orgs","repos_url":"https://api.github.com/users/odzb/repos","events_url":"https://api.github.com/users/odzb/events{/privacy}","received_events_url":"https://api.github.com/users/odzb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-02T13:11:35Z","updated_at":"2016-02-02T13:11:35Z","closed_at":null,"body":"I use React dev tools for Chrome, and they pass their own messages to the page, which makes it impossible to authorize in Trello using the popup window. Trello just receives \"[object Object]\" as the token and fails.\r\n\r\nThe fix is simple: add a check for whether e.data is a string.\r\n\r\n```\r\n      window.addEventListener('message', function(e) {\r\n        if (typeof e.data === 'string') {\r\n          clearTimeout(timeout);\r\n          popup.close();\r\n          self.token = e.data;\r\n          return resolve();\r\n        }\r\n      });\r\n`"}}