You need to sign in to do that
Don't have an account?
Nagaraja SV 12
Lightening APP
Server responded with a status of 401 in lightening out
I have added lightening App to visualforce page it working well But
the issue here is Added that visualforcepage to sites
I am geeting below
http://suragani-developer-edition.ap2.force.com/Customers/c/ContactsAPP.app?aura.format=JSON&aura.formatAdapter=LIGHTNING_OUT Failed to load resource: the server responded with a status of 401 (Unauthorized)
Any suggestions
VF page code
<apex:page standardController="contact" sidebar="false" showHeader="false" cache="false"> <apex:composition template="{!$Site.Template}"> <apex:define name="body"> <apex:includeLightning /> <div id="lightning" /> <script> $Lightning.use("c:ContactsAPP", function() { $Lightning.createComponent("c:contacts", {}, "lightning", function(cmp) { console.log("Component created!"); console.log(cmp); }); }); </script> </apex:define> </apex:composition> </apex:page>
Lightening APP
<aura:application access="GLOBAL" extends="ltng:outApp"> <aura:dependency resource="c:contacts"/> </aura:application>