
JedK.18418 (Customer) asked a question.
- XMLHttpRequest cannot load https://dev-00000.oktapreview.com/oauth2/aaaaa00000/v1/token. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:5555' is therefore not allowed access.
Its either the OPTIONS preflight, or the POST method that throws the error, but no matter what combination of headers and parameters I try I keep getting this error. I have already added "http://localhost:5555" to my trusted domains. Removing all headers only puts the error onto the POST method. I'm using Angular 2, here is my calling code: - let headers = new Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded'); headers.append('Authorization', `Basic ${this.client_details}`); let body = `grant_type=authorization_code` + '&' + `redirect_uri=${this.redirect_uri}` + '&' + `code=${auth_code}`; console.log("BODY:", body); this._http.post(`${this.authServer}/token`, body, { headers: headers, responseType: 1 } ).subscribe
Any ideas?Thanks in advance 🙂
Anyone ever figure this out? It's been two years since posted but I'm running into this problem myself.
URL is set in the admin portal. Can't figure out what else to do.
I have de same issue, any luck with this?