You need to sign in to do that
Don't have an account?

CORS issue when trying to access services/oauth2/token?code= endpoint
Hi ,
I use an angular js app which is doing an ajax call on services/oauth2/token?code= endpoint but this fails and gives an error saying
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://sunsso6.cloud.pcftest.com' is therefore not allowed access.
And when i tried a CORS plugin this worked but checking out for an actual solution so that it works without CORS plugin in chrome browser.
regards
Arun
I use an angular js app which is doing an ajax call on services/oauth2/token?code= endpoint but this fails and gives an error saying
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://sunsso6.cloud.pcftest.com' is therefore not allowed access.
And when i tried a CORS plugin this worked but checking out for an actual solution so that it works without CORS plugin in chrome browser.
regards
Arun
Try and go to Setup | Security Controls | CORS -> New in your Salesforce org and whitelist https://sunsso6.cloud.pcftest.com. Rerun your test to see if that works.

Hi Zack thank you for the suggestion i have tried the above CORS whitelisting . did not work for me any other direction which i need to take ?
Is the angularjs app on https://sunsso6.cloud.pcftest.com and trying to call into Salesforce, or does it live in Salesforce and you are trying to call into https://sunsso6.cloud.pcftest.com?

This Angular app lives outside of salesforce