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

lightning out component guess access on external application
Hi,
I am trying to use Lightning out component out side salesforce, and I see the below error in the browser console.
" GET https://rnrcommunities-developer-edition.na85.force.com/Test//c/lwcVfDemoApp.app?aura.format=JSON&aura.formatAdapter=LIGHTNING_OUT 404 (Not Found)"
Below is the code
<html>
<H1> Hello World </h1>
<div id="lightning"></div>
<script src="https://rnrcommunities-developer-edition.na85.force.com/Test/lightning/lightning.out.js"></script>
<script>
$Lightning.use("c:lwcVfDemoApp", function() {
$Lightning.createComponent("c:lwcVFDemo", {
objectName: "Contact"
},
"lightning",
function(cmp) {
console.log("LWC component was created");
// do some stuff
}
);
},
'https://rnrcommunities-developer-edition.na85.force.com/Test/'
);
</script>
</html>
NOTE: this is for allowing gues access.
Can you share your lwcVfDemoApp
OR
Make sure you are using ltng:allowGuestAccess interface in your app.
Similar to
Below is my code.
<aura:application access="GLOBAL" extends="ltng:outApp" implements="ltng:allowGuestAccess">
<aura:dependency resource="lwcVFDemo"/>
</aura:application>
Checkout this thread. https://salesforce.stackexchange.com/questions/96368/lightning-components-in-visualforce
Thank you for the replies, I am able to get the component working on a VF page in SF Org.
But unsuccessfull in running the same component outside SF.
The link that was shared above is more of for an VF Page.