{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/id.webmaker.org/issues/116","labels_url":"https://api.github.com/repos/mozilla/id.webmaker.org/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/id.webmaker.org/issues/116/comments","events_url":"https://api.github.com/repos/mozilla/id.webmaker.org/issues/116/events","html_url":"https://github.com/mozilla/id.webmaker.org/issues/116","id":65785623,"number":116,"title":"/login/oauth/access_token seems to be a GET instead of a POST","user":{"login":"toolness","id":124687,"avatar_url":"https://avatars.githubusercontent.com/u/124687?v=3","gravatar_id":"","url":"https://api.github.com/users/toolness","html_url":"https://github.com/toolness","followers_url":"https://api.github.com/users/toolness/followers","following_url":"https://api.github.com/users/toolness/following{/other_user}","gists_url":"https://api.github.com/users/toolness/gists{/gist_id}","starred_url":"https://api.github.com/users/toolness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toolness/subscriptions","organizations_url":"https://api.github.com/users/toolness/orgs","repos_url":"https://api.github.com/users/toolness/repos","events_url":"https://api.github.com/users/toolness/events{/privacy}","received_events_url":"https://api.github.com/users/toolness/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-01T21:45:40Z","updated_at":"2015-04-01T21:52:37Z","closed_at":null,"body":"The [documentation](https://github.com/mozilla/id.webmaker.org/blob/develop/docs/oauth.md#3-exchange-authorization-code-for-access-token) states that `/login/oauth/access_token` should be a POST endpoint with a form-encoded body, but after attempting to do this and getting a 404, I poked at the [source code](https://github.com/mozilla/id.webmaker.org/blob/develop/web/server.js#L117-L131) and noticed that the route currently appears to be a `GET` endpoint that takes querystring arguments instead:\r\n\r\n```js\r\n    {\r\n      method: 'GET',\r\n      path: '/login/oauth/access_token',\r\n      config: {\r\n        validate: {\r\n          query: {\r\n            code: Joi.string().required(),\r\n            client_id: Joi.string().required(),\r\n            client_secret: Joi.string().required(),\r\n            grant_type: Joi.any().valid('authorization_code').required()\r\n          },\r\n```\r\n\r\nShould I just use this for now, or should the code be changed? Or am I looking at the wrong code?"},"comment":{"url":"https://api.github.com/repos/mozilla/id.webmaker.org/issues/comments/88643634","html_url":"https://github.com/mozilla/id.webmaker.org/issues/116#issuecomment-88643634","issue_url":"https://api.github.com/repos/mozilla/id.webmaker.org/issues/116","id":88643634,"user":{"login":"jbuck","id":578466,"avatar_url":"https://avatars.githubusercontent.com/u/578466?v=3","gravatar_id":"","url":"https://api.github.com/users/jbuck","html_url":"https://github.com/jbuck","followers_url":"https://api.github.com/users/jbuck/followers","following_url":"https://api.github.com/users/jbuck/following{/other_user}","gists_url":"https://api.github.com/users/jbuck/gists{/gist_id}","starred_url":"https://api.github.com/users/jbuck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbuck/subscriptions","organizations_url":"https://api.github.com/users/jbuck/orgs","repos_url":"https://api.github.com/users/jbuck/repos","events_url":"https://api.github.com/users/jbuck/events{/privacy}","received_events_url":"https://api.github.com/users/jbuck/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T21:52:37Z","updated_at":"2015-04-01T21:52:37Z","body":"Wow, we managed to implement that incorrectly. Nice. Yes, the code should be changed to a POST with a form-encoded body.\r\n\r\n@cadecairos can you fix this up?"}}