{"action":"created","issue":{"url":"https://api.github.com/repos/openiddict/openiddict-core/issues/250","repository_url":"https://api.github.com/repos/openiddict/openiddict-core","labels_url":"https://api.github.com/repos/openiddict/openiddict-core/issues/250/labels{/name}","comments_url":"https://api.github.com/repos/openiddict/openiddict-core/issues/250/comments","events_url":"https://api.github.com/repos/openiddict/openiddict-core/issues/250/events","html_url":"https://github.com/openiddict/openiddict-core/issues/250","id":184738216,"number":250,"title":"cors works for access token but not for refresh token","user":{"login":"joel00","id":23021288,"avatar_url":"https://avatars.githubusercontent.com/u/23021288?v=3","gravatar_id":"","url":"https://api.github.com/users/joel00","html_url":"https://github.com/joel00","followers_url":"https://api.github.com/users/joel00/followers","following_url":"https://api.github.com/users/joel00/following{/other_user}","gists_url":"https://api.github.com/users/joel00/gists{/gist_id}","starred_url":"https://api.github.com/users/joel00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joel00/subscriptions","organizations_url":"https://api.github.com/users/joel00/orgs","repos_url":"https://api.github.com/users/joel00/repos","events_url":"https://api.github.com/users/joel00/events{/privacy}","received_events_url":"https://api.github.com/users/joel00/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openiddict/openiddict-core/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-24T02:51:45Z","updated_at":"2016-10-24T19:19:07Z","closed_at":null,"body":"I can get valid access tokens and refresh tokens using CORS but when i try to refresh the access token (using angular2) i get a \"XMLHttpRequest cannot load http://localhost:5000/connect/token. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access.\"\r\n\r\nI can refresh the tokens using postman.\r\n\r\nWhat I'm doing wrong?\r\n\r\n public RefreshToken() {\r\n        return this.http\r\n            .post(\r\n            this._baseUrl + 'connect/token',\r\n            this.urlEncodeValues({\r\n                'grant_type': 'refresh_token',\r\n                'refresh_token': localStorage.getItem('refresh_token')\r\n            }),\r\n            this.options // new Headers({ 'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'application/json' });\r\n            )\r\n            .map(this.extractData)\r\n            .map((res) => {\r\n                if (res.access_token) {\r\n                    localStorage.setItem('access_token', res.access_token);\r\n                    localStorage.setItem('refresh_token', res.refresh_token);\r\n                    localStorage.setItem('id_token', res.id_token);\r\n                }\r\n            })\r\n            .catch(this.handleError);"},"comment":{"url":"https://api.github.com/repos/openiddict/openiddict-core/issues/comments/255838259","html_url":"https://github.com/openiddict/openiddict-core/issues/250#issuecomment-255838259","issue_url":"https://api.github.com/repos/openiddict/openiddict-core/issues/250","id":255838259,"user":{"login":"PinpointTownes","id":6998306,"avatar_url":"https://avatars.githubusercontent.com/u/6998306?v=3","gravatar_id":"","url":"https://api.github.com/users/PinpointTownes","html_url":"https://github.com/PinpointTownes","followers_url":"https://api.github.com/users/PinpointTownes/followers","following_url":"https://api.github.com/users/PinpointTownes/following{/other_user}","gists_url":"https://api.github.com/users/PinpointTownes/gists{/gist_id}","starred_url":"https://api.github.com/users/PinpointTownes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PinpointTownes/subscriptions","organizations_url":"https://api.github.com/users/PinpointTownes/orgs","repos_url":"https://api.github.com/users/PinpointTownes/repos","events_url":"https://api.github.com/users/PinpointTownes/events{/privacy}","received_events_url":"https://api.github.com/users/PinpointTownes/received_events","type":"User","site_admin":false},"created_at":"2016-10-24T19:19:07Z","updated_at":"2016-10-24T19:19:07Z","body":"@joel00 CORS is not added for you (at least, not in the current bits) so it's something you must configure yourself. I suppose there's something wrong with your CORS policy."}}
{"actor":{"display_login":"PinpointTownes"}}