1

I have deployed a nodejs application on Heroku, it has one lightning component embedded using lightning out. But I am getting the below error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote >resource at https://myorg-dev-ed.lightning.force.com/c/sampleapp.app?>aura.format=JSON&aura.formatAdapter=LIGHTNING_OUT. (Reason: CORS header 'Access->Control-Allow-Origin' missing).

I have added my domain in CORS as well.

All works fine, If I login into Salesforce in next tab of browser to this application.

How I can resolve this if I don't login to Salesforce using the same browser.

0

Have you checked the url that you access the dependency app on - you may get a different url back from login flow. See my response Lightning Out session expired from external page

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.